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

Custom install scripts - DOMDocument->root() - ezinstallscriptpackageinstaller.php

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 4.2.0beta1
    • 4.0.3
    • None
    • Operating System: Linux Debian Etch
      PHP Version: 5.2.0-8
      Database and version: MYSQL 5.0.32
      Browser (and version): All ( firefox, IE, ... )

    Description

      Hi,
      I try to make a custom install script by following the steps in the documentation : eZ Publish 4.0 Technical Manual at the point 4.6.9, page 309.

      when i try to install the package, i have the following error :

       Fatal error: Call to undefined method DOMDocument::documentElement() in /var/www/oopro-site/kernel/classes/packageinstallers/ezinstallscript/ezinstallscriptpackageinstaller.php on line 67
      Fatal error: eZ Publish did not finish its request
      
      The execution of eZ Publish was abruptly ended, the debug output is present below.
      

      when i open the file *ezinstallscriptpackageinstaller.php* at line 67 i have this :

          function customInstallHandlerInfo( $package, $installItem )
          {
              $return = array();
      
              $itemPath = $package->path() . '/' . $installItem['sub-directory'];
              $xmlPath = $itemPath . '/' . $installItem['filename'] . '.xml';
      
              $dom =& $package->fetchDOMFromFile( $xmlPath );
      
              if ( $dom )
                  **$mainNode =& $dom->root(); // HERE IT's LINE 67**
      
              $return['file-path'] = $itemPath . '/' . $mainNode->getAttribute( 'filename' );
              $return['classname'] = $mainNode->getAttribute( 'classname' );
      
              return $return;
          }
      

      is it really a bug, or is there something i don't get ?
      Thanks,
      Pierre Brun

      Steps to reproduce

      Follow the step to create a custom install script in documentation eZ Publish 4.0 Technical Manual at the point 4.6.9, page 309.

      Attachments

        Activity

          People

            ls ls
            pbrun.sii pbrun.sii
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: