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

(tc-27) In ESI, serving files through FTp, is requiring the destination folder to exist

    Details

    • Type: Bug Bug
    • Status: Confirmed
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 4.7.0-dev, 5.3-dev
    • Component/s: Misc
    • Labels:
      None
    • Environment:

      Operating System: RHEL 6.1
      PHP Version: (please be specific, like '4.4.3' or '5.1.5') : 5.3.3
      Database and version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
      Browser (and version): Firefox 10.0.2

      Description

      Hi,

      When i try to use ESI, using ftp to serv files, i have an error if the destination file does not exist.

      the errors i get in debug are:

      rror: eZSIFTPFileHandler::connect 	Mar 22 2012 17:43:49
       
      Unable to create dir esitest/si-blocks/
       
      Notice: eZSIFTPFileHandler::connect 	Mar 22 2012 17:43:49
       
      CWD : /
       
      Warning: PHP: E_WARNING 	Mar 22 2012 17:43:49
       
      ftp_chdir(): Failed to change directory. in /var/www/apache2php53/ezp/.run/extension/ezsi/classes/filehandlers/ftp/ezsiftpfilehandler.php on line 72
       
      Warning: PHP: E_WARNING 	Mar 22 2012 17:43:49
       
      ftp_put(): Could not create file. in /var/www/apache2php53/ezp/.run/extension/ezsi/classes/filehandlers/ftp/ezsiftpfilehandler.php on line 147
       
      Error: eZSIFTPFileHandler::storeFile 	Mar 22 2012 17:43:49
       
      Unable to upload the file
       
      Error: eZSiBlockFunction::process 	Mar 22 2012 17:43:49
       
      Unable to store the file : si-blocks/54ef76f9f77e63ab5b8e1737628f350d.htm
      

      Steps to reproduce

      Setup - clear ftp server
      Login to the ftp server and delete any cache files located there
       $ ftp localhost
         Name: <username>
         Password: <password>
       ftp> cd esitest/si-blocks
       ftp> del <any file that is in this folder>
       ftp> bye
       
      (The file will be created in "esitest/si-blocks", so we have to make sure this folder does not exist to replicate the issue)
       
      Setup - create the template
      -Log in as admin in admin interface (add "/plain_site_admin" to the URL  as plain_site is the default)
      -Click "Design" in top menu
      -Click "Templates" in left menu
      -Click "/node/view/full.tpl" link (4th link below "Most common templates" )
      -Select "plain_site" in drop down
      -Click "Set" button
      -Click "New override" button
      -Enter form data:
       Extension: No extension
       Filename : article
       Class : Article
       View (without children) : checked
      -Click "OK" button
      -Click "Edit" icon for the article template
      -At the bottom if the input field, add the following code:
      <br/><br/>
      <b>ESI block below : </b><br>
      {si-block key="1" ttl="120s"}
      This is a esi test: time :  {currentdate()|l10n("time")} <br/>
      {/si-block}
       <br/><br/>
       
      Setup - Create the test article
      -Click "Content structure"
      -Click "Create here" button
      -Enter form data:
       Title : test article
       Intro : This is the intro
      -Click "Send for publishing" button
      -Logout
       
      Verify first execution of a template
      -View plain site
      -Click on "test article" link
      -Verify that you get the following on the page:
      

      The error happens in the last sentence of the steps described above.

        Activity

        Hide
        Pedro Resende (Inactive) added a comment -

        This issue is still present on 5.3

        Show
        Pedro Resende (Inactive) added a comment - This issue is still present on 5.3

          People

          • Assignee:
            unknown
            Reporter:
            Paulo Cardiga
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: