Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: New Entries while Publisher is Disabled.

Status Resolved
Add-on / Version Publisher 1.4
Severity Critical
EE Version 2.7.3

Hans Rhodes

Jun 30, 2014

Hello Brian!

I hope all is going well.
I’ve noticed that when Publisher is disabled and a new entry is created, it does not create a row in the publisher_data or the publisher_titles table. When Publisher is re-enabled, it properly defers to the channel_data table unless a draft of that entry is created.  If a draft is created a row is created for the draft but not the live entry. Then, when trying to view the published entry it just pulls up blanks for what would be in channel_data or the published version in the publisher_data table.

It seems like similar things would occur if a channel is ignored. If I remember correctly, when a channel is ignored then no entries are made in the publisher_data table. So if that channel becomes un-ignored, then the same problem would occur for those guys.

At first I was thinking of adding some sort of database sync button (I have a lot of rows, so I’d need to do it in groups) but now I’m thinking just a check for a published version (add if not there) when a draft is saved might do the trick and not be too taxing… I think I can do this myself for now if it’s a good option.

Do you think that would be the best route? Any thoughts?

#1

BoldMinded (Brian)

Try taking a look at the publisher_model.php->migrate_data() method. If you pass it an array of entry_ids it will copy data from the native tables to the publisher tables. You might be able to just call it with the $entry_ids and it could do what you’re wanting. Just backup your DB before you try anything like that.

#2

Hans Rhodes

Thanks! I made some modifications, and added some checks/call to entry_submission_ready.

Also, I included ‘delete_entries_start’ and ‘delete_entries_loop’ to the hooks that stay alive when Publisher is disabled. It seems like a good idea to delete the publisher stuff so things don’t get abandoned when an entry is deleted while Publisher is disabled.

Other than that, everything seems to be working properly!

#3

BoldMinded (Brian)

Can you send a .diff file of what you changed? I’m curious.

Login to reply