The sorting of web contents with date field is incorrect in a collection display fragment when the page language is changed between English and any other language

Issue

  • I have a lot of web content with different date fields displayed in a collection display portlet on a page. When I change the page language between English and any other language the sorting of the web contents is not correct.

Reproduction Steps:

1. Set up DXP 7.4 with U63
2. Go to Content & Data --> Web Content --> Structures and add a structure with a date field then save.
3. Add a few web content (I created 3, Date1, and Date3) from the structure and set for each different date in the date field.
4. Go to Site Builder --> Collections and add a dynamic collection. Select the web content article as "Item Type" and the structure as "Item Subtype", then at the ORDERING, select the structure at the "Order by" and observe the sorting icon "Ascending" or "Descending" and save it (In my test the sorting was Ascending).
5. Go to Site Builder --> Pages and add a content page and add to it a collection display fragment and select the created Collection to display the web contents. Publish the page.
6. Check the web content order.
Checkpoint: The web contents are in ascending order.
7. Go to the page URL and add a locale to any other language than the default (for example, /fr or /es) check the ordering of the web contents.

Actual Result: The ordering changes to descending.

Expected Result: The order of the web contents displayed should remain as it is set in the collection regardless of any language we display the contents with.

See the attached video illustration: CollDisbyDateissue.mp4

Environment

  • Liferay DXP 7.4

Resolution

  • The current behavior is expected due to the limitation of the Product. The issue is related to the "localizable" field of the web content structure, which currently cannot handle all the necessary localization specifics effectively.
  • In order to resolve the sorting issue when changing the URL between English and any other language, we should disable the localization of the structure. See attached video: datesortWorkaround.mp4
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0