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

Wrong warning when trying to add a global url alias which is already taken

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.10.1, 4.0.1, 4.1.0alpha1
    • 3.10.0, 4.0.0
    • Misc
    • None

    Description

       The URL alias <</test>> already exists, and it points to <<content/view/full/2>>
      

      The alias pointed to another node than node 2 though.

      The code in kernel/content/urlalias_global.php:

                  $result = eZURLAliasML::storePath( $aliasText, $action,
                                                     $language, $linkID, $isAlwaysAvailable, $parentID,
                                                     true, false, false );
                  if ( $result['status'] === eZURLAliasML::LINK_ALREADY_TAKEN )
                  {
                      $lastElements = eZURLAliasML::fetchByPath( $result['path'] );
                      if ( count ( $lastElements ) > 0 )
                      {
      

      However, $result['path'] will be null, as this code is executed in eZURLAliasML::storePath:

       return array( 'status' => self::LINK_ALREADY_TAKEN,
                         'path'    => null,
                         'element' => null );
      

      Tested on both 3.10 and trunk.

      Attachments

        Activity

          People

            oms Ole Marius Smestad
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: