Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-1521

Incorrect X-Siteaccess header set

    XMLWordPrintable

Details

    Description

      When viewing Landing Page Content Object in the backoffice (from Content Structure panel) there is a request being sent to "/studio/urlalias/xxx". It contains "X-Siteaccess" header that sets siteaccess for this request. Currently, this header is always set to the first siteaccess from project configuration. It should be either "default_siteaccess" or the siteaccess from UI.
      Sending always the first siteaccess from the list can cause bugs when this siteaccess has a specific configuration. For example, in customer's case, this siteaccess was using different Entity Manager and different database than the one from UI, which caused errors.

      Steps to reproduce:
      1. Install ezplatform-ee.
      2. Execute php app/console ezplatform:install studio-clean
      3. In the file app/config/ezplatform.yml, on the line 13 enter any second siteaccess (ex. "second_siteaccess") as the first one on the list. After the change this fragment should look like this:

          siteaccess:
              list:
                - second_siteaccess
                - site
      

      4. Clean cache and login to the backoffice with "Network" tab open from Chrome DevTools
      5. Go to Content/Content structure
      6. Find in the "Network" tab request that looks like this: http://ezplatform-ee.dev/studio/urlalias/0-d41d8cd98f00b204e9800998ecf8427e
      7. Check request headers. It shows: "X-Siteaccess:second_siteaccess" despite the fact that UI siteaccess is set to "site" and default_siteaccess is also set to "site".

      Attachments

        Activity

          People

            Unassigned Unassigned
            jacek.foremski-obsolete@ez.no Jacek Foremski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: