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

update() method for fieldtypes never called if field doesn’t have global settings

Developer Preview

iain's avatar
iain
317 posts
12 years ago
iain's avatar iain

I’ve come across an issue with an fieldtype add-on I’ve released (Nolan) which has no global settings. The updated version of the add-on is Grid compatible, but requires an update to all the existing serialized array data stored in the field, to convert it to a json encoded array.

After digging through the EE core, it seems without having global settings the update() method can never be called.

I’m at an impasse with this and seems like a pretty straight forward oversight with the fieldtype logic. I also note there is zero documentation about the update() method on the fieldtype developer docs.

Only option I think is to run a query on the publish page for the fieldtype version according to the db and then run the update method to do my required changes, and set ‘has_global_settings’ to ‘y’ in exp_fieldtypes.

Not ideal, and welcome any feedback or suggestions on how to get around this. Would be great if fieldtypes had a similar function to Modules where you run updates on demand.

Iain

       

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.