EE compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field.

ExpressionEngine.com licenses:

  • 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: Publisher does not save changes in non default languages in non grid fields

Status Resolved
Add-on / Version Publisher 3.0.1
Severity
EE Version 5.3.0 Build: 9/28/2019

Burgi von Mengershausen

Dec 10, 2019

Hi,

Publisher does not save changes in non default languages for any text field or textarea except text fields or textareas in grid fields.

Steps to reproduce:
install ExpressionEngine 5.3.0 with default theme.
Install Publisher 3.0.0 with bilingual setup.
Create entry in about section in default language (german)
Create translated version of the previously created and save it
Result: all changed i made within grid fields within translated version stick.
All changes i made within standard custom fields or standard textareas not sitting in grid field do not stick but are reverted to the default language version.

I have encountered this problem on all client websites where i use publisher.
To narrow down and to replicate buggy behaviour i have created the test ExpressionEngine (see credentials attached)

Please help
Thanks
Axel

 

#1

BoldMinded (Brian)

Dec 10, 2019

Thanks for the report, but this isn’t something I can replicate locally. Everything is saving fine for me. I do have a slightly newer build though, which I’ll post in the next comment. Try it and let me know what happens.

#2

BoldMinded (Brian)

Dec 10, 2019

Comment has been marked private.

#3

Burgi von Mengershausen

Dec 11, 2019

Comment has been marked private.

#4

BoldMinded (Brian)

Dec 11, 2019

That is an error that Publisher attempts to resolve when upgrading, but if it can’t auto fix the duplicate keys, then you’ll have to do it yourself, which means you’ll need to go into the DB, find the two rows in the exp_publisher_data_field_55, exp_publisher_data_field_57 etc tables and delete one of the duplicate rows. The entry_id, lang_id, and status columns are the composite keys, so there will be two or more rows that have the same values for those columns.

Side note, this is a curious error because in order for there to be duplicate rows in there the upgrade would have already had to happen to create the original rows, then you’re running the update again, which is trying to create the rows again. Are you positive the database is in a pre upgrade state? E.g. the same version that it had when Publisher 2 was installed?

#5

BoldMinded (Brian)

Dec 11, 2019

Publisher runs these queries, which removes duplicate rows from the exp_publisher_titles and publisher_data tables, so if those tables have duplicates in it, it could result in the error you’re getting.

DELETE `a`
            FROM
                `exp_publisher_titles` AS `a`,
                `exp_publisher_titles` AS `b`
            WHERE
                -- Ensures one version remains
                `a`.`id` < `b`.`id`
                -- Find duplicates
                AND `a`.`lang_id` <=> `b`.`lang_id`
                AND `a`.`status` <=> `b`.`status`
                AND `a`.`entry_id` <=> `b`.`entry_id`
DELETE `a`
            FROM
                `exp_publisher_data` AS `a`,
                `exp_publisher_data` AS `b`
            WHERE
                -- Ensures one version remains
                `a`.`id` < `b`.`id`
                -- Find duplicates
                AND `a`.`lang_id` <=> `b`.`lang_id`
                AND `a`.`status` <=> `b`.`status`
                AND `a`.`entry_id` <=> `b`.`entry_id`

Backup your pre-upgraded database and run those queries manually to see if it deletes anything, then change DELETE `a` in those queries to SELECT *, then run them again and see if it finds any duplicates still.

#6

Burgi von Mengershausen

Dec 11, 2019

Hi Brian, yes you were right, i deleted all tables and then did a restore from a backup and then the upgrade went through.
But now all front end pages are blank while the backend works fine. Restoring/downgrading to 3.0.0 build 0694ce95 files (which is the one you can download from your site within our account) immediately shows front end again. Restoring files from 3.0.1 causes blank front end again …
This happens on all sites i’m trying to upgrade.

#7

BoldMinded (Brian)

Dec 11, 2019

If you’re getting a white screen you need to turn up your debugging to reveal the error: https://boldminded.com/white-screen

#8

Burgi von Mengershausen

Dec 11, 2019

I’m getting:

Fatal error: Uncaught Error: Call to a member function get_settings() on null in /kunden/129789_41334/2019/eeengine/user/addons/publisher/legacy/models/publisher_site_pages.php:1234 Stack trace: #0 /kunden/129789_41334/2019/eeengine/user/addons/publisher/legacy/models/publisher_site_pages.php(1213): Publisher_site_pages->addTrailingSlash('/produkte/schut…') #1 /kunden/129789_41334/2019/eeengine/user/addons/publisher/Service/Frontend.php(130): Publisher_site_pages->create_page_uri_vars() #2 /kunden/129789_41334/2019/eeengine/user/addons/publisher/Service/Session.php(276): BoldMinded\Publisher\Service\Frontend->setGlobalVars() #3 /kunden/129789_41334/2019/eeengine/user/addons/publisher/ext.publisher.php(248): BoldMinded\Publisher\Service\Session->start() #4 /kunden/129789_41334/2019/eeengine/ee/legacy/libraries/Extensions.php(222): Publisher_ext->sessions_start(Object(EE_Session)) #5 /kunden/129789_41334/2019/eeengine/ee/legacy/libraries/Extensions.php(117): EE_Extensions->call_class('Publisher_ext', 'sessions_start', Arr in /kunden/129789_41334/2019/eeengine/user/addons/publisher/legacy/models/publisher_site_pages.php on line 1234
#9

BoldMinded (Brian)

Dec 11, 2019

Comment has been marked private.

#10

Burgi von Mengershausen

Dec 12, 2019

Thanks Brian, i downloaded and installed this build „8b5b12aa” . Double checked if i have correctly uploaded and installed the right files but still i get exactly the Fatal error i have mentioned above.

#11

Burgi von Mengershausen

Dec 12, 2019

and i’m getting the exact same error on all sites:

Fatal error: Uncaught Error: Call to a member function get_settings() on null in /kunden/tannerhof.de/ee5/eeengine/user/addons/publisher/legacy/models/publisher_site_pages.php:1234 Stack trace: #0 /kunden/tannerhof.de/ee5/eeengine/user/addons/publisher/legacy/models/publisher_site_pages.php(1213): Publisher_site_pages->addTrailingSlash('/gesundheitsres…') #1 /kunden/tannerhof.de/ee5/eeengine/user/addons/publisher/Service/Frontend.php(130): Publisher_site_pages->create_page_uri_vars() #2 /kunden/tannerhof.de/ee5/eeengine/user/addons/publisher/Service/Session.php(276): BoldMinded\Publisher\Service\Frontend->setGlobalVars() #3 /kunden/tannerhof.de/ee5/eeengine/user/addons/publisher/ext.publisher.php(248): BoldMinded\Publisher\Service\Session->start() #4 /kunden/tannerhof.de/ee5/eeengine/ee/legacy/libraries/Extensions.php(222): Publisher_ext->sessions_start(Object(EE_Session)) #5 /kunden/tannerhof.de/ee5/eeengine/ee/legacy/libraries/Extensions.php(117): EE_Extensions->call_class('Publisher_ext', 'sessions_start', Array, Arr in /kunden/tannerhof.de/ee5/eeengine/user/addons/publisher/legacy/models/publisher_site_pages.php on line 1234
#12

BoldMinded (Brian)

Dec 12, 2019

Comment has been marked private.

#13

Burgi von Mengershausen

Dec 12, 2019

also with 3.0.1 build effdfb38 still the same Fatal error on all sites

#14

BoldMinded (Brian)

Dec 12, 2019

Are you using the Structure module too?

#15

Burgi von Mengershausen

Dec 12, 2019

no i’m not using the Structure module

#16

BoldMinded (Brian)

Dec 12, 2019

Comment has been marked private.

#17

Burgi von Mengershausen

Dec 12, 2019

yes i’m using the Pages module … on all sites.

The first fatal error is gone with this build but now when i try to create or save an entry i get:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'd.field_id_80' in 'field list':
SELECT `t`.`entry_id`, `t`.`title` AS field_id_0, `d`.`field_id_80`, `d`.`field_id_107`, `d`.`field_id_110`, `t`.`lang_id`, `t`.`status` FROM (`exp_publisher_titles` t) INNER JOIN `exp_publisher_data` d ON `t`.`entry_id` = `d`.`entry_id` AND t.lang_id = d.lang_id AND t.status = d.status WHERE `t`.`channel_id` IN (20) AND `t`.`entry_id` IN (271)
#18

BoldMinded (Brian)

Dec 12, 2019

Is there more to that error? A stack trace by chance so I can tell what is calling that query?

#19

Burgi von Mengershausen

Dec 12, 2019

#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query('SELECT `t`.`ent…')
#1 ee/legacy/database/DB_driver.php(270): CI_DB_mysqli_driver->_execute('SELECT `t`.`ent…')
#2 ee/legacy/database/DB_driver.php(180): CI_DB_driver->simple_query('SELECT `t`.`ent…')
#3 ee/legacy/database/DB_active_rec.php(1138): CI_DB_driver->query('SELECT `t`.`ent…')
#4 user/addons/publisher_low_search/ext.publisher_low_search.php(204): CI_DB_active_record->get()
#5 ee/legacy/libraries/Extensions.php(222): Publisher_low_search_ext->low_search_get_index_entries(Array, Array)
#6 ee/legacy/libraries/Extensions.php(117): EE_Extensions->call_class('Publisher_low_s…', 'low_search_get_…', Array, Array)
#7 user/addons/low_search/libraries/Low_search_index.php(224): EE_Extensions->call('low_search_get_…', Array, Array)
#8 user/addons/low_search/libraries/Low_search_index.php(83): Low_search_index->build_by_collection(2, Array)
#9 user/addons/low_search/ext.low_search.php(95): Low_search_index->build_by_entry(Array)
#10 user/addons/low_search/ext.low_search.php(121): Low_search_ext->after_channel_entry_save(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array)
#11 ee/legacy/libraries/Extensions.php(222): Low_search_ext->after_channel_entry_update(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array, Array)
#12 ee/legacy/libraries/Extensions.php(117): EE_Extensions->call_class('Low_search_ext', 'after_channel_e…', Array, Array)
#13 [internal function]: EE_Extensions->call('after_channel_e…', Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array, Array)
#14 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(635): call_user_func_array(Array, Array)
#15 [internal function]: EllisLab\ExpressionEngine\Service\Model\Model->EllisLab\ExpressionEngine\Service\Model\{closure}('after_channel_e…', Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array, Array)
#16 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(608): call_user_func_array(Object(Closure), Array)
#17 [internal function]: EllisLab\ExpressionEngine\Service\Model\Model->EllisLab\ExpressionEngine\Service\Model\{closure}(Array)
#18 ee/EllisLab/ExpressionEngine/Service/Event/Emitter.php(141): call_user_func_array(Object(Closure), Array)
#19 [internal function]: EllisLab\ExpressionEngine\Service\Event\Emitter->emit('afterUpdate', Array)
#20 ee/EllisLab/ExpressionEngine/Library/Data/Entity.php(654): call_user_func_array(Array, Array)
#21 [internal function]: EllisLab\ExpressionEngine\Library\Data\Entity->emit('afterUpdate', Array)
#22 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(828): call_user_func_array('parent::emit', Array)
#23 ee/EllisLab/ExpressionEngine/Service/Model/Query/Update.php(52): EllisLab\ExpressionEngine\Service\Model\Model->emit('afterUpdate', Array)
#24 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(282): EllisLab\ExpressionEngine\Service\Model\Query\Update->run()
#25 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(248): EllisLab\ExpressionEngine\Service\Model\DataStore->runQuery('Update', Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#26 ee/EllisLab/ExpressionEngine/Service/Model/Query/Builder.php(71): EllisLab\ExpressionEngine\Service\Model\DataStore->updateQuery(Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#27 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(361): EllisLab\ExpressionEngine\Service\Model\Query\Builder->update()
#28 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(225): EllisLab\ExpressionEngine\Service\Model\Model->save()
#29 ee/EllisLab/ExpressionEngine/Controller/Publish/AbstractPublish.php(376): EllisLab\ExpressionEngine\Model\Content\ContentModel->save()
#30 ee/EllisLab/ExpressionEngine/Controller/Publish/Edit.php(527): EllisLab\ExpressionEngine\Controller\Publish\AbstractPublish->saveEntryAndRedirect(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry))
#31 [internal function]: EllisLab\ExpressionEngine\Controller\Publish\Edit->entry('230')
#32 ee/EllisLab/ExpressionEngine/Core/Core.php(241): call_user_func_array(Array, Array)
#33 ee/EllisLab/ExpressionEngine/Core/Core.php(110): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#34 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#35 web/admin/index.php(147): require_once('...')
#35 web/admin/index.php(147): require_once('...')
#20

BoldMinded (Brian)

Dec 12, 2019

Ah crap. I forgot to update the Publisher Low Search extension to match the Publisher 3 updates. I’ll try to do this tonight and maybe get a build to you tomorrow, or at the latest Monday next week. Sorry about that.

#21

Burgi von Mengershausen

Dec 12, 2019

Yes please. And if necessary please also update Publisher Domain Control https://boldminded.com/add-ons/publisher-domain-control

#22

BoldMinded (Brian)

Dec 12, 2019

That one should be unaffected as it doesn’t query entries.

#23

BoldMinded (Brian)

Dec 12, 2019

Comment has been marked private.

#24

Burgi von Mengershausen

Dec 12, 2019

Produces error on save:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'exp_d.field_id_80' in 'field list':
SELECT `t`.`entry_id`, `t`.`title` AS field_id_0, `exp_d`.`field_id_80`, `exp_d`.`field_id_107`, `exp_d`.`field_id_110`,…
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query('SELECT `t`.`ent…')
#1 ee/legacy/database/DB_driver.php(270): CI_DB_mysqli_driver->_execute('SELECT `t`.`ent…')
#2 ee/legacy/database/DB_driver.php(180): CI_DB_driver->simple_query('SELECT `t`.`ent…')
#3 user/addons/publisher/Service/Entry/EntryQuery.php(224): CI_DB_driver->query('SELECT `t`.`ent…')
#4 user/addons/publisher_low_search/ext.publisher_low_search.php(207): BoldMinded\Publisher\Service\Entry\EntryQuery->getResultArray()
#5 ee/legacy/libraries/Extensions.php(222): Publisher_low_search_ext->low_search_get_index_entries(Array, Array)
#6 ee/legacy/libraries/Extensions.php(117): EE_Extensions->call_class('Publisher_low_s…', 'low_search_get_…', Array, Array)
#7 user/addons/low_search/libraries/Low_search_index.php(224): EE_Extensions->call('low_search_get_…', Array, Array)
#8 user/addons/low_search/libraries/Low_search_index.php(83): Low_search_index->build_by_collection(4, Array)
#9 user/addons/low_search/ext.low_search.php(95): Low_search_index->build_by_entry(Array)
#10 user/addons/low_search/ext.low_search.php(121): Low_search_ext->after_channel_entry_save(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array)
#11 ee/legacy/libraries/Extensions.php(222): Low_search_ext->after_channel_entry_update(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array, Array)
#12 ee/legacy/libraries/Extensions.php(117): EE_Extensions->call_class('Low_search_ext', 'after_channel_e…', Array, Array)
#13 [internal function]: EE_Extensions->call('after_channel_e…', Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array, Array)
#14 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(635): call_user_func_array(Array, Array)
#15 [internal function]: EllisLab\ExpressionEngine\Service\Model\Model->EllisLab\ExpressionEngine\Service\Model\{closure}('after_channel_e…', Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry), Array, Array)
#16 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(608): call_user_func_array(Object(Closure), Array)
#17 [internal function]: EllisLab\ExpressionEngine\Service\Model\Model->EllisLab\ExpressionEngine\Service\Model\{closure}(Array)
#18 ee/EllisLab/ExpressionEngine/Service/Event/Emitter.php(141): call_user_func_array(Object(Closure), Array)
#19 [internal function]: EllisLab\ExpressionEngine\Service\Event\Emitter->emit('afterUpdate', Array)
#20 ee/EllisLab/ExpressionEngine/Library/Data/Entity.php(654): call_user_func_array(Array, Array)
#21 [internal function]: EllisLab\ExpressionEngine\Library\Data\Entity->emit('afterUpdate', Array)
#22 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(828): call_user_func_array('parent::emit', Array)
#23 ee/EllisLab/ExpressionEngine/Service/Model/Query/Update.php(52): EllisLab\ExpressionEngine\Service\Model\Model->emit('afterUpdate', Array)
#24 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(282): EllisLab\ExpressionEngine\Service\Model\Query\Update->run()
#25 ee/EllisLab/ExpressionEngine/Service/Model/DataStore.php(248): EllisLab\ExpressionEngine\Service\Model\DataStore->runQuery('Update', Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#26 ee/EllisLab/ExpressionEngine/Service/Model/Query/Builder.php(71): EllisLab\ExpressionEngine\Service\Model\DataStore->updateQuery(Object(EllisLab\ExpressionEngine\Service\Model\Query\Builder))
#27 ee/EllisLab/ExpressionEngine/Service/Model/Model.php(361): EllisLab\ExpressionEngine\Service\Model\Query\Builder->update()
#28 ee/EllisLab/ExpressionEngine/Model/Content/ContentModel.php(225): EllisLab\ExpressionEngine\Service\Model\Model->save()
#29 ee/EllisLab/ExpressionEngine/Controller/Publish/AbstractPublish.php(376): EllisLab\ExpressionEngine\Model\Content\ContentModel->save()
#30 ee/EllisLab/ExpressionEngine/Controller/Publish/Edit.php(527): EllisLab\ExpressionEngine\Controller\Publish\AbstractPublish->saveEntryAndRedirect(Object(EllisLab\ExpressionEngine\Model\Channel\ChannelEntry))
#31 [internal function]: EllisLab\ExpressionEngine\Controller\Publish\Edit->entry('271')
#32 ee/EllisLab/ExpressionEngine/Core/Core.php(241): call_user_func_array(Array, Array)
#33 ee/EllisLab/ExpressionEngine/Core/Core.php(110): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#34 ee/EllisLab/ExpressionEngine/Boot/boot.php(151): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#35 web/admin/index.php(147): require_once('...')
#35 web/admin/index.php(147): require_once('...')
#25

BoldMinded (Brian)

Dec 12, 2019

Comment has been marked private.

#26

Burgi von Mengershausen

Dec 13, 2019

Sorry but i’m still getting the same sql error on save entry like above also with the publisher_low_search-300-19afd7b6 installed.
Uninstalling publisher_low_search: saving entries produces no error at all.
Installing again: sql error on save

#27

BoldMinded (Brian)

Dec 13, 2019

Is the entry in a channel ignored by Publisher? (this would be set in Publisher’s Ignore settings page)

#28

Burgi von Mengershausen

Dec 13, 2019

no it is not and i never ever have used the Publisher’s Ignore settings page

#29

BoldMinded (Brian)

Dec 13, 2019

What entry id are you editing so I can login to your CP and take a look?

#30

Burgi von Mengershausen

Dec 13, 2019

Comment has been marked private.

#31

BoldMinded (Brian)

Dec 13, 2019

Comment has been marked private.

#32

BoldMinded (Brian)

Dec 13, 2019

Comment has been marked private.

#33

Burgi von Mengershausen

Dec 13, 2019

looking good, thanks! No more errors so far.

#34

BoldMinded (Brian)

Dec 13, 2019

Phew! Good to hear. Sorry about the back and forth.

Login to reply

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.