Share » Forums » Developer » [solved] Problems creating custom...

[solved] Problems creating custom workflowevent: "Call to...

[solved] Problems creating custom workflowevent: "Call to...

Tuesday 14 February 2006 6:39:21 am - 5 replies

Modified on Thursday 16 February 2006 3:07:19 am by Achim Bleidiessel

Author Message

Juan Pablo Vercesi

Tuesday 14 February 2006 9:16:31 am

Hi Achim,

if you only have copied and modified the files, I think there might be problem with the .ini files. Are you sure they are completed in the right way?
Remember that when you create an extension of your own, there are certain rules that you should keep in mind in matter of paths (names, locations and structure, etc).

It would also help to trace the problem if you paste the line that is mentioned in the fatal error.

Greetings

JP,
may the source be with you.

Achim Bleidiessel

Tuesday 14 February 2006 3:39:09 pm

Hi Juan,
thanks for your reply, first of all the line which is mentioned in the error:

321: if ( $http->hasPostVariable( "NewButton" ) )
322: {
323:     $new_event = eZWorkflowEvent::create( $WorkflowID, $cur_type );
324:     $new_event_type =& $new_event->eventType();
325:     $db =& eZDB::instance();
326:     $db->begin();
327: 
328:     if ($canStore) $workflow->store( $event_list );
329:     $new_event_type->initializeEvent( $new_event );
330:     $new_event->store();
331:
332:     $db->commit();
333:     $event_list[] =& $new_event;
334: }

so the initialization of the events fails but i dont know what this means.

concerning the ini-files and structure of the extension i strictly followed the documentation:
the path of the event is:
'extension/ezadvancedonlineshop/eventtypes/event/ezadvancedshipping/ezadvancedshippingtype.php'

and i inserted the following lines in
'extension/ezadvancedonlineshop/settings/workflow.ini.append'

[EventSettings]
ExtensionDirectories[]=ezadvancedonlineshop
AvailableEventTypes[]=event_ezadvancedshipping

as consequence i can activate the extension in the admin-interface ('setup > extensions')
but i always get this failure i mentioned in my post before. I hoped its a typo but i really couldnt find anything, so i have to missunderstood something about creating extensions i think. any suggestions???

thanks
achim

Kristof Coomans

Wednesday 15 February 2006 12:23:58 am

Did you enable eZ debug output? If so, do you get any debug errors or warnings?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Wednesday 15 February 2006 12:33:50 am

I found the error:

eZWorkflowEventType::registerType( EZ_WORKFLOW_TYPE_ADVANCEDSHIPPING_ID, "advancedshippingtype" );

has to be:

eZWorkflowEventType::registerType( EZ_WORKFLOW_TYPE_ADVANCEDSHIPPING_ID, "ezadvancedshippingtype" );

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Achim Bleidiessel

Thursday 16 February 2006 3:06:05 am

Ah now it works, many thanks!!
I really didnt recognized this mad mistake....
Thanks!

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu