Tribune

Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Ben Chapman
Display Page does not show canonical URL
8 maggio 2013 6.34
Risposta

Ben Chapman

Punteggio: New Member

Messaggi: 23

Data di Iscrizione: 7 marzo 2011

Messaggi recenti

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
Wieteke den Uijl
RE: Display Page does not show canonical URL
27 maggio 2013 8.15
Risposta

Wieteke den Uijl

Punteggio: Junior Member

Messaggi: 55

Data di Iscrizione: 19 aprile 2011

Messaggi recenti

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
RE: Display Page does not show canonical URL
19 febbraio 2015 5.59
Risposta

ANIS HANTACH

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 5 febbraio 2015

Messaggi recenti

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)
Juan Gonzalez
RE: Display Page does not show canonical URL
19 febbraio 2015 6.13
Risposta

Juan Gonzalez

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 2858

Data di Iscrizione: 28 ottobre 2008

Messaggi recenti

Hi Anis,

instead of that hook, did you try to changing the Asset Publisher option "Link behaviour" to "View in context"?
ANIS HANTACH
RE: Display Page does not show canonical URL
19 febbraio 2015 7.31
Risposta

ANIS HANTACH

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 5 febbraio 2015

Messaggi recenti

I try in the first with "View in context" but it gives the long URL