Forums / Extensions / Sqliimport in fuji (4.4)
Peder Dukefos
Tuesday 22 March 2011 2:34:43 am
Hi! Has anyone been able to run sqliimport in fuji/4.4? I uploaded a fresh copy of sqliimport 1.2.0 and then entered the admin interface and tried to activate it. I then got this error: "Class eZPendingActions in file extension/sqliimport/classes/ezpendingactions.php is already defined in: kernel/classes/ezpendingactions.php (autoload/ezp_kernel.php) This class was not added to the autoload array." According to this link; http://bit.ly/cZO2NG this is "No big deal". But I wasn't able to find out to fix this, so I deleted ezpendingactions.php from the extension. As it is already a part of eZ, and should therefore be redundant. I then emptied all caches, generated atoload-arrays, and tried the activation again. I now got to errors in eZ debug:Error: eZINI::save Failed opening file 'settings/override/site.ini.append.php.tmp' for writing Error: eZExtension::activeExtensions Extension 'ezwt' does not exist, looked for directory 'extension/ezwt' And now I'm stumped :-)Does anyone have any advice on how to get sqliimport up and running in 4.4?
Jérôme Vieilledent
Tuesday 22 March 2011 3:14:45 am
Hello Peder
I have SQLIImport up and running on a fresh Fuji installation. The warning you have when you regenerate autoloads is because I backported eZPendingActions class from Fuji to be used in previous eZ Publish versions. I'll remove this class in a future version and propose it as a separate download.
Your other errors don't seem to be related to SQLIImport but to other extensions issues. Instead of activating extensions from the admin interface, try to activate manually from your site.ini.append.php file ;)
And by the way, you should take the latest SVN version from trunk (1.2.1) as several issues are fixed in it and I didn't have time to package a new version.
Tuesday 22 March 2011 4:17:00 am
Ah, manually activating from site.ini.append.php worked like a charm!
Thank you :-)
Monday 04 April 2011 1:23:23 am
Hello again,
I've gotten a bit further, but now I've stumbled on another question: How do I send parameters and/or variables into SQLIimport?
E.g. I have a php-file that fetches the nodeID for the object I want to update. And want to send that ID into $content = SQLIContent::fromNodeID($myFetchedNodeID); in my handler.
I've tried adding it through php $_post, $_get and in the call for the handler, i.e. "php extension/sqliimport/bin/php/sqlidoimport.php --source-handlers=myHandler --options="myHandler::myFetchedNodeID=357" "
But, alas to no avail so far. Any tips?
Monday 04 April 2011 2:41:22 am
Options are passed to your handler's constructor as an SQLIImportHandlerOptions object. This object is iterable and you can access to your options this way :
$myOption = $handlerOptions->optionName; // $handlerOptions is an SQLIImportHandlerOptions object // Object is iterable foreach ( $handlerOptions as $optionName => $optionValue ) { echo "Option name is : $optionName\n"; echo "Option value is : $optionValue"; }