Hi there,
I’m trying to use the EE API to insert/update entries and I’ve come across an issue - quite possibly my mistake … but maybe not …
Using v2.1.3 Build: 20101220 Calling $this->EE->api_channel_entries->update_entry with a data array containing only the fields I want to update, the system seems to loop through all the ‘required’ fields and include them in the update. However, because I’m only updating a few fields, the system is updating the entry with blanks for the fields I dont specify.
Using v2.1.0 Build: 20100810 So, I took my code from v2.1.3 and tried it against v2.1.0, and the update_entry works as expected - I only pass in the fields I want to update, and the system only updates those fields - the rest of the fields remain intact.
The system I’m working on was started by another individual, an so it’s possible that the issue isnt with the EE core base but rather with the multitude of plugins, modules, etc that have been installed into this instance.
Any thoughts?
Oh, and the documentation about the API is very thin - just a few lines in the user guide!
Regards Donald
Moved to Development and Programming by Moderator
Hi Sue - I actually posted this same question in the developer forum a few days ago, but received no feedback, and so I thought that I might have more luck in the support area. Anyway - feel free to remove the other thread as it’s a duplicate - I tried deleting it myself but couldnt.
Judging from the zero responses to my issue (except yours, of course), I’m thinking that a) The API isnt used much, b) I might be onto something in terms of a ‘hidden feature’ (i.e. a bug/anomaly), or c) I’m totally off the mark and my question doesnt therefore warrant a reply!
Going forward: I’m going to do some more testing to put my mind at ease, then move the system into a previous version of EE, and if I hit any more issues then I’ll ditch the API.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.