Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-358

Rest personalisation not accepting query parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • 2.2.11
    • None
    • None

    Description

      Steps to reproduce

      1. Install demo-rest-p13n module.
      2. Try querying by navigationTitle and p13n trait favourite-color:
        http://localhost:8080/magnoliaAuthor/.rest/delivery/pages/v1/?favorite-color=black&navigationTitle="Shoes"

      Expected results

      Page with navigationTitle "Shoes" and corresponding variation is returned

      Actual results

      No results are returned

      Dev notes

      Personalization works with requests like localhost:8080/./delivery/pages/v1/shoes?favorite-color=black because read nodes method is called. However when sending parameters with no path (localhost:8080/magnoliaAuthor/.rest/delivery/pages/v1/?favorite-color=black&navigationTitle="Shoes"), query nodes method is called and consequently, the personalization trait is used as if it was also a parameter creating a query as follows:

      SELECT t.* FROM [nt:base] AS t WHERE t.[jcr:primaryType] = 'mgnl:page' AND t.[favorite-color] = 'black' AND t.navigationTitle = 'Shoes'

      This obviously won't return any result.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jayala Jonathan Ayala
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD