Forums de discussion

Display Page does not show canonical URL

thumbnail
Ben Chapman, modifié il y a 10 années.

Display Page does not show canonical URL

New Member Publications: 23 Date d'inscription: 08/03/11 Publications récentes
Friends,

I have manually created a page to be a display page. It is named "Display". I added an asset publisher and I ticked the "Set as the Default Asset Publisher for This Page" box. I created multiple pieces of web content. I set the display page for each piece of content to be "Display". When I click on "View Content in Display", I get the canonical URL:



However, if I am displaying the content as the result of clicking the "Read More" link in an asset publisher, I get the big long URL that is not the canonical URL:

https://my.law.emory.edu/web/bjchapm/articles/-/asset_publisher/GAOrNFj1l9zh/content/article-1?redirect=https%3A%2F%2Fmy.law.emory.edu%2Fweb%2Fbjchapm%2Farticles%3Fp_p_id%3D101_INSTANCE_GAOrNFj1l9zh%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_count%3D1

Why is this? Am I doing something wrong? This does not seem to be the expected behavior as documented here:

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen03-display-settings-0

Is it because we are using HTTPS?

Thank you for any suggestions you have.

Ben
thumbnail
Wieteke den Uijl, modifié il y a 10 années.

RE: Display Page does not show canonical URL

Junior Member Publications: 56 Date d'inscription: 19/04/11 Publications récentes
Hi Ben,

Have you configured the Asset Publisher so it shows content in a specific portlet by selecting "view in specific portlet" as asset link behaviour? However in my case this does not completely solve the issue. Each web content item is now available at its own canonical URL, but if you click on the read more-link in an asset publisher it still shows a redirect-part after the canonical URL. Does anyone know how to solve this?
ANIS HANTACH, modifié il y a 9 années.

RE: Display Page does not show canonical URL

New Member Publications: 2 Date d'inscription: 05/02/15 Publications récentes
I solved the porblem , to display the canonical url in the asset publisher , you need to make a hook for the folder display of asset_publisher and recalculate the viewURL to passed in parameter the currentURL

String viewURL = assetRenderer.getURLViewInContext(liferayPortletRequest, liferayPortletResponse, currentURL)
thumbnail
Juan Gonzalez, modifié il y a 9 années.

RE: Display Page does not show canonical URL

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Hi Anis,

instead of that hook, did you try to changing the Asset Publisher option "Link behaviour" to "View in context"?
ANIS HANTACH, modifié il y a 9 années.

RE: Display Page does not show canonical URL

New Member Publications: 2 Date d'inscription: 05/02/15 Publications récentes
I try in the first with "View in context" but it gives the long URL