Should keeping the vanity url same as the original page url affect the sidekick workflow option? - aem

I am a beginner at CQ5. I created a simple workflow with 2 paths - accept and reject. I created a page and set its vanity url the same as the original page url and checked the "Redirect Vanity url" text box. Next I pushed the page down the workflow. But then when I opened up the page in the browser and clicked on the workflow tab of the sidekick, it was completely blank. Removing the vanity url brought back the workflow tab contents. Can someone explain to me why this happened so? This wasn't mapped in the ConfigMgr console.

I found that the vanity url actual does something like a "Redirect". So if we add a vanity url to a page which has the same url as the vanity url, the page goes into something like an infinite loop, redirecting to itself. This causes trouble in various sorts. In my case, it was affecting the workflow.

Related

How do I cancel GitHub Pages redirection?

I created a web page using GitHub Pages. I added the custom domain by following the Settings>Pages path. The page redirect was successfully performed by creating the CNAME file.
I wanted to cancel the page redirect after a while. Therefore I removed the CNAME file and followed all the steps mentioned in the documents. But I was not able to cancel the page redirect. How can I fix this problem?
Since the website redirect is saved in the browser's cache, the redirect will continue even if the redirect is cancelled via the Settings>Pages tab on GitHub; this will automatically cause the CNAME file to be deleted. The way to solve this problem:
Remove the previous redirect by going to Settings>Pages on GitHub.
Rebuild the page via the Actions tab on GitHub.
Click the F12 while the browser is open.
Long click on the refresh button on the browser.
Select the Empty Cache and Hard Reload option.
When you try to enter the website again, you will see that the redirect has been cancelled.

How do I extend the vanity URL functionality within AEM

I'm working in AEM 6.3. I'm trying to extend the default behavior of vanity URLs such that the following will happen:
User navigates to vanity URL and is redirected to actual URL
An ID that is associated (and authorable) is appended to the URL
Profit?
So I'd be extending the default page properties vanity functionality to include an ID.
Example:
Vanity URL: /foobar
ID: 123
Actual URL: www.test.com/plans
Resulting URL: www.test.com/plans?123
I've been able to modify the page properties to include a new field associated with the vanity URL in the UI. It doesn't appear to be saving the actual value though.
Haven't gotten to actually trying to apply this saved value to the URL through the dispatcher. How that would work is still very vague as well.
Yes. You could do that. But you will have to build your page rendering logic based on the URL used for accessing the page. Guess you could manage with two public facing URLs - the vanity url and the final url constructed based on the ID.
As for dispatcher configuration, check the official documentation at the below link for handling vanity URLs
https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html#enabling-access-to-vanity-urls-vanity-urls

Vanity URL to a content page when activated does not reflect in publish instance in AEM 6.1

What are the best practices for assigning vanity URL to a content page in AEM 6.1.
When an author mentions a vanity path to a page and activates it, it does not really reflect in publish. Problem I observed is: when the save operation carries out on page vanity property, it saves an rewrite rule at the map location, which is generally at /etc/map unless it is specifically changed.
So when the page containing vanity path activates then this rewrite rule does not really activates along, although the JCRResorceResolver map location is same for publish and author instance which is /etc/map.
Therefore, I wanted to understand what is the way of activating the resource resolver rewrite rule along with page activation? Or are there any best practices that the vanity should not be given a control to page editors and should only be performed by an administrator directly in publish instance?
/etc/map has nothing to do with vanity urls. In /etc/map you can manually add some path/host to resource mappings.
When an editor adds a vanity url, the resource resolver(s) will catch that event and add the url to their list - if a page with a vanity url is published, the AEM publish servers will also add the vanity url automativally to their resolvers.
Take a look at /system/console/jcrresolver on both author and publish. You should see the vanity url on both machines.
If you want your vanity url on root level, it should start with "/". Other things that might prevent the vanity url from working:
You might have additional mapping rules on /etc/map(.*).
There is a dispatcher in front of your CQ/AEM Publish server that is filtering or manipulating the incoming urls.
What exactly is the vanity url added by your editor (content path and content of field vanity url) and what is the url you are calling to get the page via vanity url on the publish instance?

is a page redirect to most current article bad from an seo perspective?

I have navigation at the top of my site that links to news/
The news is always paginated, one article per page, with the ability to navigate to the next or previous article.
I would like the default article to be the second-to-last most current article. So if there are 10 articles, when the user clicks on news/, they are redirected to news/9 with 302 redirect code.
From an SEO perspective, is it bad to be constantly redirecting like this? Would it be better to change the link in the top navigation to instead link directly to news/9, and keep changing that everytime there is a new article instead?
Search engines expect a given piece of content to have a canonical URL. It's OK to have any number of URLs to a single page but use a canonical URL.
Sop no matter what redirect you have, add a canonical URL and search engine will take care of any mess.
302 redirects are for this. Use it.

handle subpages inside facebook app (with one single tab)

My goal is that have a fb page app (only in one tab) and use it with linkable subpages inside it.
For example:
If I click on subpage link there would be a http or ajax request inside the iframe. Thats fine, i can do that.
BUT
in the solution I also want to implement these two features:
1.:
I want that page to be accessible directly from an url like:
http://facebook.com/pagename/app..blabla/subpage1
or
http://facebook.com/pagename/app..blabla&sk=535&subpage=1
or
http://facebook.com/pagename/app..blabla#subpage1
2.:
On subpage link click inside iframe I want the browser url to turn into something like mentioned in the 1. point. (even when using ajax - probably with a hash tag)
Is it possible?
If you look at the page tab tutorial http://developers.facebook.com/docs/appsonfacebook/pagetabs/ at the bottom of the page they describe how you can create the 'subpage' idea using the app_data parameter. So your links will look like http://www.facebook.com/YourPage?v=app_1234567890&app_data=any_string_here
For your second question, in the links on the page you would specify target="_top" in any links you have with the href being: http://www.facebook.com/YourPage?v=app_1234567890&app_data=subpage1. This will cause the entire page tab to load through Facebook and you'll get the signed_request and your app_data parameters.
You probably don't want your ajax to load through facebook, because you'll get the Facebook page back instead of json or whatever you are trying to load. Instead you'll just make ajax calls to your server and pass the parameters you need to, like app_data or whatever you want.