We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

API - update_entry

Development and Programming

DonaldGarlick's avatar
DonaldGarlick
4 posts
15 years ago
DonaldGarlick's avatar DonaldGarlick

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

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker

Hi, Donald. Excellent question, but better suited for our developer forum. Moving there for additional community support.

       
DonaldGarlick's avatar
DonaldGarlick
4 posts
15 years ago
DonaldGarlick's avatar DonaldGarlick

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.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
15 years ago
Sue Crocker's avatar Sue Crocker
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

y

Let’s have you rule that out first.

       
DonaldGarlick's avatar
DonaldGarlick
4 posts
15 years ago
DonaldGarlick's avatar DonaldGarlick

Hi Sue - please point me to a link where I can download a fresh copy of v2.1.3

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.