Fórum

Display Page does not show canonical URL

thumbnail
Ben Chapman, modificado 10 Anos atrás.

Display Page does not show canonical URL

New Member Postagens: 23 Data de Entrada: 08/03/11 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Display Page does not show canonical URL

Junior Member Postagens: 56 Data de Entrada: 19/04/11 Postagens Recentes
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, modificado 9 Anos atrás.

RE: Display Page does not show canonical URL

New Member Postagens: 2 Data de Entrada: 05/02/15 Postagens Recentes
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, modificado 9 Anos atrás.

RE: Display Page does not show canonical URL

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Hi Anis,

instead of that hook, did you try to changing the Asset Publisher option "Link behaviour" to "View in context"?
ANIS HANTACH, modificado 9 Anos atrás.

RE: Display Page does not show canonical URL

New Member Postagens: 2 Data de Entrada: 05/02/15 Postagens Recentes
I try in the first with "View in context" but it gives the long URL