掲示板

Display Page does not show canonical URL

thumbnail
10年前 に Ben Chapman によって更新されました。

Display Page does not show canonical URL

New Member 投稿: 23 参加年月日: 11/03/08 最新の投稿
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
10年前 に Wieteke den Uijl によって更新されました。

RE: Display Page does not show canonical URL

Junior Member 投稿: 56 参加年月日: 11/04/19 最新の投稿
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?
9年前 に ANIS HANTACH によって更新されました。

RE: Display Page does not show canonical URL

New Member 投稿: 2 参加年月日: 15/02/05 最新の投稿
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
9年前 に Juan Gonzalez によって更新されました。

RE: Display Page does not show canonical URL

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Hi Anis,

instead of that hook, did you try to changing the Asset Publisher option "Link behaviour" to "View in context"?
9年前 に ANIS HANTACH によって更新されました。

RE: Display Page does not show canonical URL

New Member 投稿: 2 参加年月日: 15/02/05 最新の投稿
I try in the first with "View in context" but it gives the long URL