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

URLs in legacy_mode lose siteaccess uri when index_page is used

    Details

      Description

      When a legacy siteaccess is configured with a URI part, and the index_page setting is used, accessing the index page will generate uris without the siteaccess uri part.

      Reproducing:

      Using the following example configuration:

          siteaccess:
              match:
                  Compound\LogicalAnd:
                      ezdemo_site:
                          matchers:
                              Map\URI:
                                  demo: true
                              Map\Host:
                                  www.host.local: true
                          match: ezdemo_site
                  Map\Host:
                      admin.host.local: ezdemo_site_admin
                      www.host.local: eng
      ...
          system:
              ezdemo_site:
                  languages:
                      - eng-GB
                  legacy_mode: true
                  index_page: content/dashboard
                  default_page: content/dashboard
      

      • (Optional): add an output of ezurl() call to legacy pagelayout:

        <div>
            <h3>The the generated ezurl() is: {'content/action'|ezurl()}</h3>
        </div>
        

      • Clear caches, access http://www.host.local/demo
      Result:

      The generated urls will NOT start with "/demo" as they should
      For example, the uri for "content/action" should be "/demo/content/action"

        Activity

        Hide
        Joao Inacio (Inactive) added a comment - - edited

        Proposed fixes:

        1. Always Inject index_page and default_page settings
        2. Fix (disable) index page forward under legacy mode
        Show
        Joao Inacio (Inactive) added a comment - - edited Proposed fixes: Always Inject index_page and default_page settings https://github.com/ezsystems/LegacyBridge/pull/5 Fix (disable) index page forward under legacy mode https://github.com/ezsystems/ezpublish-kernel/pull/1187 https://github.com/ezsystems/LegacyBridge/pull/10
        Show
        Joao Inacio (Inactive) added a comment - Merged in master: LegacyBridge @ https://github.com/ezsystems/LegacyBridge/commit/6538b0ac35c9c0b5bf26d622d75a0664a271c561 ezpublish-kernel @ https://github.com/ezsystems/ezpublish-kernel/commit/b8655b293e8dd72f9641d6e235d6480521e02160 LegacyBridge @ https://github.com/ezsystems/LegacyBridge/commit/78a3ff1f39f1abf03e10991686b3de6aadc82689
        Hide
        Paulo Nunes (Inactive) added a comment -

        QA Approved
        Tested on 5.3 and 5.4.
        Having legacy_mode, the master test was skipped.

        Show
        Paulo Nunes (Inactive) added a comment - QA Approved Tested on 5.3 and 5.4. Having legacy_mode, the master test was skipped.

          People

          • Assignee:
            Unassigned
            Reporter:
            Joao Inacio (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: