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

Wrong links generated when using Map\Host siteaccess matching

    Details

      Description

      This is a regression from EZP-21668.
      When using Map\Host for siteaccess matching, generated links from Location objects lack the leading /.

      Steps to reproduce

      With the following config, and using DemoBundle:

      ezpublish:
          siteaccess
              match:
                  Map\Host:
                      admin.ezpublish5.loc: ezdemo_site_admin
                      ezpublish5.loc: ezdemo_site_user
      

      The links in the top menu of the demo design are wrong when the user is on a page with some view parameters.

      1. Go to /Blog
      2. Click on the next link in the calendar
      3. Click on any element of the top menu

      The link points to /Blog/(month)/11/(year)/Something instead of /Something

      Note: the same issue is also valid for the Latest news links in the footer

        Issue Links

          Activity

          Hide
          Damien Pobel (Inactive) added a comment -

          I've just pulled ezpublish-community, ezpublish-kernel and the demo bundle and I still have the issue. Here is the generated code for the menu:

                      <ul class="nav">
                                      <li id="nav-location-112"><a href="Spell-form-token">Spell form token</a></li>
                                      <li id="nav-location-111"><a href="Editorial-Interface-Test">Editorial Interface Test</a></li>
                                      <li id="nav-location-97"><a href="Contact-Us">Contact Us</a></li>
                                      <li id="nav-location-94"><a href="Discover-eZ-Publish-5">Discover eZ Publish 5</a></li>
                                      <li id="nav-location-90"><a href="Blog">Blog</a></li>
                                      <li id="nav-location-74"><a href="Shopping">Shopping</a></li>
                                      <li id="nav-location-61"><a href="Getting-Started">Getting Started</a></li>
                                  </ul>

          as you can see the href attributes miss the beginning slash. After digging a bit, it seems like this happens since this commit https://github.com/ezsystems/ezpublish-kernel/commit/c670f5cc9a461b82baf212b4a3f9d281f0fbfc79
          For the record, I'm using Map\Host in my siteaccess matching settings.

          Show
          Damien Pobel (Inactive) added a comment - I've just pulled ezpublish-community, ezpublish-kernel and the demo bundle and I still have the issue. Here is the generated code for the menu: <ul class="nav"> <li id="nav-location-112"><a href="Spell-form-token">Spell form token</a></li> <li id="nav-location-111"><a href="Editorial-Interface-Test">Editorial Interface Test</a></li> <li id="nav-location-97"><a href="Contact-Us">Contact Us</a></li> <li id="nav-location-94"><a href="Discover-eZ-Publish-5">Discover eZ Publish 5</a></li> <li id="nav-location-90"><a href="Blog">Blog</a></li> <li id="nav-location-74"><a href="Shopping">Shopping</a></li> <li id="nav-location-61"><a href="Getting-Started">Getting Started</a></li> </ul> as you can see the href attributes miss the beginning slash. After digging a bit, it seems like this happens since this commit https://github.com/ezsystems/ezpublish-kernel/commit/c670f5cc9a461b82baf212b4a3f9d281f0fbfc79 For the record, I'm using Map\Host in my siteaccess matching settings.
          Show
          Jérôme Vieilledent (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/554
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/6a2fe08c1b833df85f32440f80b449e1bfc837d5
          Hide
          Joao Pingo (Inactive) added a comment -

          QA Approved

          Show
          Joao Pingo (Inactive) added a comment - QA Approved

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 30 minutes Original Estimate - 30 minutes
                30m
                Remaining:
                Time Spent - 2 hours, 30 minutes Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - 2 hours, 30 minutes Remaining Estimate - 30 minutes
                2h 30m