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

Wrong Link in RSS Feed when a PathPrefix is defined

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Medium Medium
    • 3.9.2
    • 3.8.6
    • Misc
    • None
    • eZ 3.8.6

    Description

      Hi

      I have a "bug" on my site with links in the RSS Feed:

      I need to explain the configuration of my sites:

      In the BO (Back Office -> administration of the site), we have 2 spaces at the root node of eZPublish. The first space is a workspace, not visible (accessible) by the internet site (FO), the second is the publication space accessible from the FO (Front Office -> sites that can be viewed by the net surfer) where we have all our "sites".

      To access the sites from the front, we need to use these urls:

      http://www.mysite.com/publication_space/site1/
      http://www.mysite.com/publication_space/site2/

      For more comfort, in the .ini of the each siteaccess, we have defined a PathPrefix :

      [SiteAccessSettings]
      PathPrefix=publication_space/site1/

      In the general .ini we have the default site:
      [SiteSettings]
      DefaultAccess=site1

      Now let's see the "bug":

      In the BO we have defined 2 RSS:
      A RSS for the site1 (default site in the front) and a RSS for the site2.

      In the BO if we use rss/feed/site1 -> it will show the RSS and all the documents that are published in the site1. All links to documents are of this type: http://mysite.com/publication_space/site1/document

      For the RSS of the site2, it's the same thing: http://mysite.com/publication_space/site2/document

      There is no problem for the BO, links are good.

      Now, let's see the Front where we have defined a PathPrefix and a defaultAccess.

      For the RSS of the site1, all links in the RSS will be:
      http://mysite.com/site1/document

      The problem is for the RSS of all other sites, links will be:
      http://mysite.com/publication_space/site2/document

      The links are not good, if we try to access to the document, we have the kernel error document does not exist.

      So we see that for a siteaccess which is not the defaultaccess, PathPrefix is not use to make the links of the document in the RSS.

      Links are made in the class: ezrssexport.php :

      if ( $useURLAlias === true )
      {
          $nodeURL = $baseItemURL.$node->urlAlias();
      }
      

      For the default siteaccess, urlalias() return the site without the pathprefix. For other siteaccess, it returns the site with the pathprefix.

      Could you, please, correct this bug to permit to RSS to use PathPrefix in all siteaccess and not only for the DefaultAccess.

      Thanx a Lot,

      Fred.

      PS: For the moment, to have good links, in kernel/rss/feed.php, instead of use :

      echo $rssContent;

      I use :

      echo str_replace("publication_space/","",$rssContent);

      PS2 : sorry for my poor english.

      Attachments

        Activity

          People

            rl rl
            freeman freeman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: