All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: Does Publisher when deinstalled double the file grid rows?

Status Resolved
Add-on / Version Publisher 3.9.1
Severity
EE Version 7.2.14

Werner Gusset

Oct 30, 2023

Is it possible that Publisher 3.9.1 is responsible for the following effect:

A website that has long had only the default language is freed from Publisher. On a copy with EE 7.2.14 I uninstalled Publisher and adapted all templates. When we checked a moment later, we found all the lines doubled in the CP for entries with file grids - and of course also on the website.
I can only imagine that Publisher must somehow be in play here. What do you think?

#1

BoldMinded (Brian)

It’s possible, but there is an uninstall method in the Grid type class that does this:

if ($db->table_exists($tableName) && $db->field_exists('publisher_lang_id', $tableName)) {
                    $db->where('publisher_status', Status::DRAFT)->delete($tableName);
                    $db->where('publisher_lang_id !=', $this->request->getDefaultLanguage()->getId())->delete($tableName);

If that code executed, as it should have, then it should have also removed all draft and non-default language rows.

#2

Werner Gusset

OK. What exactly does this mean to me? Do I need to do something, or what?

#3

BoldMinded (Brian)

It’ll be a couple days before I can try to test and replicate this myself. In the mean time, if you have a database backup prior to un-installing, I’d suggest restoring that, and dropping a var_dump() or die() statement inside that conditional (search the publisher folder for that line of code) and see if it gets called, then check the table rows to see if there are still duplicates, and if so, note which duplicate rows still exist to see why it might not have removed them.

#4

BoldMinded (Brian)

I just did a quick test and everything was correctly removed from the grid tables when uninstalling Publisher. If you have duplicate rows left then you might have to remove them manually b/c there isn’t a way to determine why they are duplicate.

#5

Werner Gusset

And I did a fresh copy of the site with EE 7.2.14 and Publisher 3.9.1. On that copy there are none of the double file grid rows. I then deinstalled Publisher. The results are about 200 entries and more with file grids, some of which have up to 8 photos. All rows are double in the grid. And now we are supposed to correct this manually?

#6

BoldMinded (Brian)

Are you saying this is only happening in File Grid fields? Not normal Grid fields?

#7

BoldMinded (Brian)

Comment has been marked private.

#8

Werner Gusset

Comment has been marked private.

#9

BoldMinded (Brian)

Comment has been marked private.

#10

Werner Gusset

Comment has been marked private.

#11

Werner Gusset

Comment has been marked private.

#12

BoldMinded (Brian)

Replace “Y” with whatever your default language ID is (usually 1)

I don’t know what your grid field IDs are, you’ll have to look in your database, but this is a better example.

delete from exp_channel_grid_field_10 where publisher_lang_id != 1; delete from exp_channel_grid_field_10 where publisher_status = “draft”;

#13

Werner Gusset

Comment has been marked private.

#14

BoldMinded (Brian)

Glad you got it sorted out!

Login to reply