Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
2011.5
-
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.