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

REST index missing module repository activation

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 2011.5
    • Fix Version/s: None
    • Labels:
      None

      Description

      Using the eZContentFunctions::createAndPublishObject($params) function from my custom REST controller, i get the following :

      Warning:  Invalid argument supplied for foreach() in /usr/local/apache_php531/htdocs/dpc11/lib/ezutils/classes/ezmoduleoperationinfo.php on line 82
      Notice:  Undefined variable: definitionFile in /usr/local/apache_php531/htdocs/dpc11/lib/ezutils/classes/ezmoduleoperationinfo.phpon line 89
      

      The eZContentObject is properly created, so is the eZNodeAssignment, but the eZContentObjectTreeNode is not.

      Adding the following at line 43 in index_rest.php fixes the issue :

      // Initialize module loading
      $moduleRepositories = eZModule::activeModuleRepositories();
      eZModule::setGlobalPathList( $moduleRepositories );
      

      Steps to reproduce

      1. Create a custom REST controller, from which content is created (using the eZContentFunctions::createAndPublishObject for instance)
      2. Request this controller after having made sure to get the errors displayed.

        Activity

        Hide
        Nicolas Pastorino added a comment -
        Show
        Nicolas Pastorino added a comment - Fixed in nfrp fork: in : 18337_rest_issue branch : https://github.com/nfrp/ezpublish/commit/6035cbbae2f3f47a123ae98dceb6d504ed4baa9b
        Show
        Nicolas Pastorino added a comment - Related discussion: http://share.ez.no/forums/developer/modules-not-initialized-in-rest-api/(offset)/last

          People

          • Assignee:
            Nicolas Pastorino
            Reporter:
            Nicolas Pastorino
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: