Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21206

Languages list does not work for siteaccesses with dashes in their name

    XMLWordPrintable

Details

    Description

      Siteacccesses that include a dash (-) appear to work correctly, but when accessed will not correctly resolve their language lists, and possibly other siteaccess-specific settings.

      Example:

      Have two siteaccesses, "por" and "por-PT":

      ezpublish:
        system:
          por:    { languages: [por-PT, eng-GB] }
          por-PT: { languages: [por-PT, eng-GB] }
      

      (unnecessary details omitted)

      When /por is accessed, it is correctly resolved, including translated objects. ezpublish.siteaccess and app.request.locale in Twig templates are "por" and "pt_PT" respectively, as expected.

      However, when /por-PT is accessed, ezpublish.siteaccess is, as expected, "por-PT" (so siteaccess matching for siteaccesses with dashes seems to work at least partially), but app.request.locale defaults to "en", and content objects are displayed with the default language, and not the primary siteaccess language.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Filipe.Dobreira-obsolete@ez.no Filipe Dobreira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours
                7h