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

PublicAPI : Unable to lookup urlAlias

    XMLWordPrintable

Details

    Description

      Hi

      Seems like we are now unable to lookup urlaliases
      I have a object ("/News")

      And a function to look up urlaliases:

          public function getLocationByPath( $path )
          {
              if( isset( $path[0] ) && $path[0] != '/' )
              {
                  print "  warning  Prefixed $path with a forward slash --> /$path\n";
                  $path = "/$path";
              }
      
              $urlAliasService = $this->repo->getURLAliasService();
              $locationService = $this->repo->getLocationService();
              $alias           = $urlAliasService->lookup( $path, $this->lang );
      
              return $locationService->loadLocation( $alias->destination->id ); // This is ezpublishapitesthelper.php:533
      
          }
      
      

      Then calling this function using getLocationByPath( '/News' ) causes the following backtrace:

      1) eZPublishAPIInteger::testTC1397CreateIntegerObject
      eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue: Argument 'locationId' is invalid: 'NULL' is wrong value
      
      /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish/eZ/Publish/Core/Repository/LocationService.php:195
      /var/www/apache2php53/ezpublish5/vendor/ezsystems/ezpublish/eZ/Publish/Core/SignalSlot/LocationService.php:101
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitesthelper.php:533
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/datatypes/integer/ezpublishapiinteger.php:156
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:698
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitest.php:115
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/datatypes/integer/ezpublishapiinteger.php:137
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:727
      /var/www/apache2php53/ezpublish5/ezpublish_testsystem/tests/toolkit/ezptestrunner.php:372
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            vidar.langseid@ibexa.co Vidar Langseid
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: