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

Deleting member fires TAB save() method with null data

Developer Preview

Jace Richardson's avatar
Jace Richardson
13 posts
8 years ago
Jace Richardson's avatar Jace Richardson

When you delete a member and choose to reassign their entries to another member, it fires the save() method on each entry but passes in NULL values for all the params the save() method is expecting.

From the docs for a TAB file:

Module_name_tab::save($entry, $values)
Called during a ChannelEntry entity's afterSave event, this allows you to insert data/update data:

When you delete a Member and choose to re-assign their entries to another member, should EE be firing that save() method?

In my testing, reassigning entries to another member is causing that method to fire, but the $entry values are being passed as NULL causing unexpected behavior in any add-on that has a TAB file and is not explicitly checking for the existence of those values.

member delete null values

We’ve gotten around this for now by adding this to our TAB file save() method:

if(!empty($_POST['bulk_action'])) return;

If this is incorrect or may cause issues with other functionality, please let me know.

       
Seth Barber's avatar
Seth Barber
172 posts
8 years ago
Seth Barber's avatar Seth Barber

Hi obfuscode,

We should not be trying to save tab data when we reassign entries on Member delete. I’ll work on a patch and let you know when I’ve got something.

       

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.