I need to move multiple entries from one category to another for housekeeping purposes.
On the entry manager screen I applied ‘Familiies’ as Category filter which returned 55 entries. I then chose ‘Add categories’ from the ‘actions’ dropdown at the bottom of the list.
In the resulting modal window it stated ‘Any categories selected will be assigned to the selected entries in addition to the current category selection for those entries’ which is what wanted. I selected ‘Leisure’ as the additional category and hit the ‘Save all & close’ button.
To my dismay all 55 original entries were no longer appearing when I filtered on either Families or Leisure. Looking at the database I noticed that the exp_category_posts data was missing for each of the 55 entries meaning that essentially these entries were no longer categorised at all.
As I had taken a db backup beforehand I managed to restore the category information.
After a bit of debugging it looks as though it’s the ‘before_channel_entry_save’ extension hook which is causing this issue. As far as I can tell this hook, when called from the bulk edit toolbar wipes all category data for all the entries selected.