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

URIElement siteaccess matcher passes wrong value when setting value > 1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 5.4.5
    • Fix Version/s: Customer request, 5.4.6, 16.02
    • Component/s: Misc
    • Labels:
      None

      Description

      It has been verified that the URIElement siteaccess matcher passes a wrong value when the setting value defined in ezpublish.yml is grater than 1.

      Ref: https://doc.ez.no/display/EZP/Siteaccess+Matching#SiteaccessMatching-Availablematchers

      Steps to reproduce:

      1. Prepare a test eZ Publish 5.4 installation, fully updated to 5.4.5;
      2. Edit ezpublish/config/ezpublish.yml, and set the URIElement matcher to a value greater than 1:

      ezpublish:
          siteaccess:
              ...
              match:
                  URIElement: '2'
      

      3. Edit /vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/SiteAccess/Matcher/URIElement.php and add the following debug code:

      public function __construct($elementNumber)
      {
          var_dump( (int)$elementNumber );
          $this->elementNumber = (int)$elementNumber;
      }
      

      4. Visit a siteaccess. A "int(2)" debug message would be expected, instead "int(1)" is displayed.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        3m 37s 1 nuno.oliveira@ez.no 28/Dec/15 6:35 PM
        Confirmed Confirmed InputQ InputQ
        11m 58s 1 ricardo.correia@ez.no 28/Dec/15 6:47 PM
        InputQ InputQ Development Development
        7d 17h 1m 1 joao.inacio@ez.no 05/Jan/16 11:48 AM
        Development Development Development Review Development Review
        26m 33s 1 joao.inacio@ez.no 05/Jan/16 12:15 PM
        Development Review Development Review Documentation Review done Documentation Review done
        22d 2h 38m 1 joao.inacio@ez.no 27/Jan/16 2:53 PM
        Documentation Review done Documentation Review done QA QA
        34m 23s 1 Paulo Nunes 27/Jan/16 3:28 PM
        QA QA Closed Closed
        19h 49m 1 Paulo Nunes 28/Jan/16 11:17 AM

          People

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

            Dates

            • Created:
              Updated:
              Resolved: