Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-134062

Asset Publisher fails to display content filtering by a Web Content field when the user has switched to another language

    Details

      Description

      (This was first observed on sales.liferay.com - 7.2, and on our in-progress upgrade to 7.3 on our dev environment - please let me know if you would like access to review.  I've now replicated on a clean 7.3 bundle)

      (This behaivor has been reproduced with Legacy DDM Index Fields enabled and disabled)

      When using Asset Publisher to dynamically display lists of Web Content articles, if a user switches their language to anyone, available in site but different than the system default, Asset Publisher fails to return the correct results if filtering is based on a Web Content structure field.

      Steps to reproduce:

      Create a Web Content Structure with a "Select" field, assign multiple values:

      • Web Content Structure: "Sort Test"
      • Field: "SortField"
      • Field values: "A" ,"B", "C", "D", "E"

      Create a Category Vocabulary, assigned to "Sort Test" web content structure:

      • Vocabulary name "Filter Test"
      • Categories: "A", "B", "C", "D"

      Add a number of Web Content Articles with different field values and categories

      I created 10 with Titles as follows (Field value and Category match the title):

      • Title 1 - Cat D - Field A
      • Title 2 - Cat D - Field A
      • Title 3 - Cat D - Field A
      • Title 4 - Cat D - Field D
      • Title 5 - Cat D - Field D
      • Title 6 - Cat D - Field E
      • Title 7 - Cat D - Field C
      • Title 8 - Cat C - Field A
      • Title 9 - Cat C - Field A
      • Title 10 - Cat D - Field B

      This can be tested with default Widget Templates, but it is easier to see the results with a custom template to display just the title

      Widget Template to display Web Content Title ("Title"):

      <#if entries?has_content>
         <#list entries as entry>
               ${entry.getTitle(locale)}<br>
         </#list>
      </#if>

      Create three pages, each with one Asset Publisher to test Filtering.

      Page 1 - this is a "control" that will display all 10 Web Content Articles:

      Asset Publisher :

      • Asset Type: "Web Content Article"
      • Web Content Article Structure: "Sort Test"
      • Order by "Title" (Ascending)
      • Display Template: "Title"

      Page 2 - Asset Publisher filtered by Category "D":

      Asset Publisher :

      • Asset Type: "Web Content Article"
      • Web Content Article Structure: "Sort Test"
      • Filter by Category "D"
      • Order by "Title" (Ascending)
      • Display Template: "Title"

      Page 3 - Asset Publisher filtered by field "SortTest" with value "A" and Category "D":

      Asset Publisher :

      • Asset Type: "Web Content Article"
      • Web Content Article Structure: "Sort Test"
      • Filter by Field: "Yes"
      • Field to filter on: "SortField"
      • Field value: "A"
      • Filter by Category "D"
      • Order by "Title" (Ascending)
      • Display Template: "Title"

      Results - Default Language "English (United States)":

      Page 1

      • Asset Publisher shows 10 records, in title order (Title 1, Title 10, Title 2 etc.)

      Page 2

      • Asset Publisher shows 8 records in title order - just those with Category "D"

      Page 3

      • Asset Publisher shows 3 records (Title 1, Title 2 and Title 3)

      Results - Switch user language to "français":

      (Click User Icon, choose Account Settings, Language, select "français")

      Page 1

      • Asset Publisher shows 10 records, in title order (Title 1, Title 10, Title 2 etc.)

      Page 2

      • Asset Publisher shows 8 records in title order - just those with Category "D"

      Page 3

      • Asset Publisher shows 0 records 

      Note - it is not strictly necessary to follow all of these steps to reproduce - I created more articles and more pages than strictly necessary to apply some "control" to narrow in on the problem.  A single page (Page 3) could be used, with a smaller number of content articles.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              team-echo Product Team Echo
              Reporter:
              lourdes.fernandez Lourdes Fernández Besada
              Participants of an Issue:
              Recent user:
              Tomáš Polešovský
              Engineering Assignee:
              Lourdes Fernández Besada
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                12 weeks, 4 days ago

                  Packages

                  Version Package
                  7.4.2 CE GA3 DXP 7,4
                  Master