eevent_helper.ee2_addon icon indicating copy to clipboard operation
eevent_helper.ee2_addon copied to clipboard

Incompatible with DataGrab

Open GDmac opened this issue 14 years ago • 7 comments

I have to disable the extension before i can import stuff into an event channel.

GDmac avatar Mar 01 '12 15:03 GDmac

Can you elaborate? What kind of errors do you encounter?

amphibian avatar Mar 01 '12 15:03 amphibian

I'm creating a simple XML with channel-entries on one site, to import the entries with Datagrab on the staging server. The entry_date and expiration_date don't get thru (entry_date gets set to date of import) and the eevent date_field gets set to strange dates (e.g. 1999-01-03 or something). When i set eevent_helper temporary to no channel (--) then the import works. I think it has to do with how the data is coming in, thru the API and not thru the publish form.

(editted for clarity)

GDmac avatar Mar 02 '12 01:03 GDmac

(edited for better explaining)

GDmac avatar Mar 02 '12 19:03 GDmac

This is indeed an issue with Eevent Helper and the Channel Entries API. Because I'm altering entry data before its saved, I need to work with the data in $_POST. There's obviously no $_POST when entries are added via the API, so I can't work my magic, but the API still calls all the entry_submission_X hooks. I also can't (AFAIK) detect whether the hook has been called via the control panel or via the API.

amphibian avatar Mar 02 '12 19:03 amphibian

Just a quick note: i think you can check REQ == 'CP' or to that extent to check wether it's a CP request. I'll probably look into this the coming weeks as a new project will need to sync events with an external datasource. i'll keep you posted.

GDmac avatar Oct 04 '12 08:10 GDmac

Unfortunately, checking this way would exclude the Safecracker submissions as well.

amphibian avatar Oct 04 '12 12:10 amphibian

No, that's not my intent. Maybe populate POST[] or other means to have EEventhelper work with the API and/or other imports.

GDmac avatar Oct 04 '12 13:10 GDmac