AEM Link Checker: How to prevent the Link is removed if it is INVALID - aem

I have a request from PM to prevent AEM automatically removing the invalid link in Publisher.
Here are from AEM Document :
Internal links are validated as soon as the content author adds an internal links to a page. If the link becomes invalid:
It is removed from the publisher. The text of the link remains, but
the link itself is removed.
It is shown as a broken link in the
authoring interface.
I tried with many settings but it didn't work for me. Anyone knows the anwser?
I really appreciate your help.
Thank,
Duc

You can add x-cq-linkchecker="valid" attribute in the tag to make sure that links are always mark as valid by AEM. In this case link checker will check the link but will mark it valid. ( For Ex:- <a x-cq-linkchecker=”valid” …>)
You can optionally use x-cq-linkchecker="skip" attribute in the tag as well. In this case link checker will not even check for validity for link. ( For Ex:- <a x-cq-linkchecker=”skip” …>)

Related

Pass reference id from url bar to other internal pages

I am compiling a lead generation landing page and, in the form I have inserted a hidden field which collect whatever is written in the url bar after
"?rel=".
This is done in order to track where the leads come from (Facebook ads, direct linking etc).
To be more clear if this is the url: www.mywebsite.com/form.html?rel=fbads
the hidden field will be fill with "fbads" and this is working.
In the landing page I have a link to another page with more details and in this webpage I have the same form.
My idea is to run campaings on the first page with the rel link, but then if the user clicks on the link and go to the detailed page (and then compile the form from there), I am losing the rel field.
How can I pass the rel field to the url of the second page?
Thanks
You may refer the this stackoverflow page. Once the HTTP GET request comes, traverse in HTTP headers in your controller and look for Referer field but it is not always set and the client can change the header value. May be using google analytics is the better option.
If you just want to know that whether if they came to your form page from your landing page or not, you may add fix HTTP URL parameter prior to HTTP redirect.
If you save your rel in a variable, you can add it on your link to detailed page, for example in case of =fbads just once variable is set up, add it: <a href="http://myDetailedPage.com/detailed/?=<?php $rel;?>"</a>

sightly/HTL/AEM: using "tel:" on an href parameter (a tag) doesn't work

help please. I have this very simple code.
<sly data-sly-test.temp1="tel:+61-8-8201-3343"></sly>
my link
it works fine if using "mailto" as target but when using "tel", the href tag is empty (inspected the tag using firebug while on view as published).
Also as can be seen in the sample code, my last line displays the value. The value displays fine when using "mailto" and "tel".
If I change my code to
<a href="tel:123-456-789">
${properties.linkTitle}
</a>
The href tag is populated properly.
any ideas what I am doing wrong? Thanks
edit:
based on suggestions from this link, I modified both:
/libs/cq/xssprotection/config.xml
/libs/sling/xss/config.xml
and restarted my local AEM instance but nothing would work.
The link checker transformer is removing your tel: link, because the prefix is not known in it's configuration. All links are checked and the invalid are removed when the template is rendered.
You have to extend the CQ Link Checker Service configuration by adding "tel:" as new "Special Link Prefix".
In order to to this just copy the configuration from /libs/cq/linkchecker/config/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl to your config folder e.g. /apps/myapp/config and edit the property service.special_link_prefix

Facebook reporting "og:type=website" but scraped reports "og:type=article"!

I have a news.read application already accepted by Facebook, but with some Wordpress update it stopped working, because Facebook assumes that "og:type" of my articles are set to "website" and therefore nothing works.
The problem is that the source I can check through my browser has a proper "og:type" and even when clicking "See exactly what our scraper sees for your URL" it reports the proper og:type!
Is this some kind of bug or am I missing something?
Here's an example URL: http://www.jornalinsolito.com/um-ato-sexual-que-dura-ha-47-milhoes-de-anos/
Any help is useful!
You have tags ouside of your . This is either because your was malformed and they fell lower in the parse tree, or you accidentally put your Open Graph tags in the wrong place. Either way you need to fix it before the tags are usable.
checkout here

HTML5 Validation - PHP Form Action Attribute Empty

I was just validating some of my html5 pages on W3C with forms (PHP) on them and I get the following validation error:
Error: Bad value for attribute action on element form: Must be non-empty.
I thought that when the form submits to itself, it is good practice to leave the action attribute empty. Is this not the case? How can I fix this?
Thank you!
Simply put in "#".
<form action="#" method=post>
While browsers currently support the empty action since the spec says it's needed browsers in the future may not support it. In my opinion this is unlikely but you never know.
The reason I would add the action attribute is so if there is JavaScript somewhere that is actually posting the form the next developer in line is certain that this is were the form posts to and doesn't have to look though the relevant JavaScript files to see if this is intended or left out on mistake.
It can be fixed my putting the current page in the action attribute.
Hope that helps.

Facebook Business LIKE box is giving an Open Graph error

You supplied an Open Graph type via
one of the supported meta tags, but
the type you specified "link" is not
valid.
The above is the error I get when the "LIKE" button is clicked.
I tried to set all sorts of OG meta tags. You can see the code live at http://luxe.sonikastudios.com
I looked at many different forums etc. but no clear answer is given. I don't even have an og type "link" specified.
I put my page through the linter provided by Facebook (http://developers.facebook.com/tools/lint/) and I don't see any errors coming up as far as I can tell (but then I don't even know what this screen is supposed to look like in case there is an error).
Any help would be appreciated.
Appears to be a known FB Bug: http://bugs.developers.facebook.net/process_bug.cgi
I think it doesn't like your <meta property="fb:link"> tag. Where did you get it from?
Just remove everything and leave only required params listed here. I would also recommend setting type to article. See if that works. If it does then start adding new params one by one until it fails.