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: content not saving correctly in combination with Structure

Status Resolved
Add-on / Version Publisher 3.10.3
Severity
EE Version 7.3.14

Jelle / Karres en Brands

Jan 18, 2024

Hi Brian,
I contacted you before on this, and did some further investigation.
The site has been using Publisher for a long time, and recently Structure was added to the mix. It started when we noriced values for Reinos Maps were not saved, or not parsed on the cp edit screen. But later we also noticed that other simple text fields did not update/get saved anymore. This happened when we set the channel as a Structure listing channel.
When we deselected the channel as a listing channel it started working / saving correctly again

But if i set the channel as a listing channel, and disable the publisher extentions it all works as it should. My guess is that something is conflicting between the 2 addons. Maybe js related.
Underneath you’ll find some communication between me and Brad/Robin from eeharbor for further reference.

I have a test site setup and can give you all access you need

Good Morning Jelle,

Met with Robin and Tom on this to discuss next steps.  Since we have the bug narrowed down a lot more now we are thinking at this point you should pull Brian Litzinger (the owner of Publisher) in.  You can show him the exact error log you just sent over to us and see if he can get an update rolled out for publisher to fix this extension function “after_channel_entry_save”.

I do not have a copy of publisher, the fix might be as simple as checking that it is not null before making a call to get_id() but I do not know for certain what is happening in this extension and line, this will be something Brian needs to take a closer second look at.
I would suggest sending over this error to Brian as well as mentioning it seems to be happening on structure listings in case that is somehow handled differently.

Thanks!

On Wed, Jan 17, 2024 at 3:51 AM Jelle Dijkstra | BuroDenG!

wrote:

  Hi all,

  I have all publisger extentions disabled, and went through all relevant extentions, turning them on individually. When i enable this one for instance “after_channel_entry_save”

  I keep getting the below error
  Call to a member function getId() on null

  user/addons/publisher/Service/Entry/Entry.php:228
  Stack Trace: Please include when reporting this error

      #0 user/addons/publisher/ext.publisher.php(478): BoldMinded\Publisher\Service\Entry\Entry->save()
      #1 ee/legacy/libraries/Extensions.php(226): Publisher_ext->after_channel_entry_save()
      #2 ee/legacy/libraries/Extensions.php(110): EE_Extensions->call_class()
      #3 [internal function]: EE_Extensions->call()
      #4 ee/ExpressionEngine/Service/Model/Model.php(664): call_user_func_array()
      #5 [internal function]: ExpressionEngine\Service\Model\Model->ExpressionEngine\Service\Model\{closure}()
      #6 ee/ExpressionEngine/Service/Model/Model.php(610): call_user_func_array()
      #7 [internal function]: ExpressionEngine\Service\Model\Model->ExpressionEngine\Service\Model\{closure}()
      #8 ee/ExpressionEngine/Service/Event/Emitter.php(132): call_user_func_array()
      #9 [internal function]: ExpressionEngine\Service\Event\Emitter->emit()
      #10 ee/ExpressionEngine/Library/Data/Entity.php(637): call_user_func_array()
      #11 [internal function]: ExpressionEngine\Library\Data\Entity->emit()
      #12 ee/ExpressionEngine/Service/Model/Model.php(843): call_user_func_array()
      #13 ee/ExpressionEngine/Service/Model/Query/Update.php(49): ExpressionEngine\Service\Model\Model->emit()
      #14 ee/ExpressionEngine/Service/Model/DataStore.php(275): ExpressionEngine\Service\Model\Query\Update->run()
      #15 ee/ExpressionEngine/Service/Model/DataStore.php(240): ExpressionEngine\Service\Model\DataStore->runQuery()
      #16 ee/ExpressionEngine/Service/Model/Query/Builder.php(72): ExpressionEngine\Service\Model\DataStore->updateQuery()
      #17 ee/ExpressionEngine/Service/Model/Model.php(370): ExpressionEngine\Service\Model\Query\Builder->update()
      #18 ee/ExpressionEngine/Model/Content/ContentModel.php(219): ExpressionEngine\Service\Model\Model->save()
      #19 user/addons/channel_images/ft.channel_images.php(1531): ExpressionEngine\Model\Content\ContentModel->save()
      #20 user/addons/channel_images/ft.channel_images.php(586): Channel_images_ft->_process_post_save()
      #21 ee/legacy/libraries/api/Api_channel_fields.php(391): Channel_images_ft->post_save()
      #22 ee/ExpressionEngine/Model/Content/FieldFacade.php(242): Api_channel_fields->apply()
      #23 ee/ExpressionEngine/Model/Content/ContentModel.php(74): ExpressionEngine\Model\Content\FieldFacade->postSave()
      #24 ee/ExpressionEngine/Model/Channel/ChannelEntry.php(438): ExpressionEngine\Model\Content\ContentModel->onAfterSave()
      #25 [internal function]: ExpressionEngine\Model\Channel\ChannelEntry->onAfterSave()
      #26 ee/ExpressionEngine/Service/Model/Model.php(840): call_user_func_array()
      #27 ee/ExpressionEngine/Service/Model/Query/Update.php(49): ExpressionEngine\Service\Model\Model->emit()
      #28 ee/ExpressionEngine/Service/Model/DataStore.php(275): ExpressionEngine\Service\Model\Query\Update->run()
      #29 ee/ExpressionEngine/Service/Model/DataStore.php(240): ExpressionEngine\Service\Model\DataStore->runQuery()
      #30 ee/ExpressionEngine/Service/Model/Query/Builder.php(72): ExpressionEngine\Service\Model\DataStore->updateQuery()
      #31 ee/ExpressionEngine/Service/Model/Model.php(370): ExpressionEngine\Service\Model\Query\Builder->update()
      #32 ee/ExpressionEngine/Model/Content/ContentModel.php(219): ExpressionEngine\Service\Model\Model->save()
      #33 ee/ExpressionEngine/Controller/Publish/AbstractPublish.php(454): ExpressionEngine\Model\Content\ContentModel->save()
      #34 ee/ExpressionEngine/Controller/Publish/Edit.php(517): ExpressionEngine\Controller\Publish\AbstractPublish->saveEntryAndRedirect()
      #35 [internal function]: ExpressionEngine\Controller\Publish\Edit->entry()
      #36 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()
      #37 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()
      #38 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()
      #39 admin.php(139): require_once(’...’)
      #39 admin.php(139): require_once(’...’)


  Op 16-1-2024 om 17:21 schreef help EEHarbor:
>    Alright! I think this gets us closer, so for next steps what if we can try and narrow it down further to the exact extension that is busting things.  So if we have a list of these extensions you just turned off, do any of them have a name that would do to saving? or on saves? Something to this effect?
>
>    If not, can we try turning them off and on and narrow down to what extension it is this way?
>
>    If we can narrow it down to what extension we could look and see if somewhere in that function if it is saving differently (like in some if conditional) based on if it is a structure listing or not since it seemed like for my debugging and your debugging this only happened to things marked as a listing in the structure settings.

#1

BoldMinded (Brian)

Hi, Jelle. I’m going to need a lot more information on this. I have a lot of customers using Publisher and Structure together just fine, and I run them in my local environment all the time and don’t encounter any issues.

What do your Structure settings look like? Please share screenshots.

#2

BoldMinded (Brian)

The error is occurring on the line where it’s trying to get the current languageId, and the language is set in the core_boot hook. If there is no language, then to me it seems like something is interrupting the request and not letting Publisher set the language. If Structure is performing any redirects, which I know it does with certain settings, then this might cause the issue. If Structure’s redirect settings are enabled, try disabling them first and see what happens.

#3

BoldMinded (Brian)

Also, have you tried replicating this in an EE environment with only Publisher and Structure installed… no other add-ons?

#4

Jelle / Karres en Brands

ok. all redirect settings are set to no

If i go into the DB, enable the core_boot hook the ID should be there you say? So then when i enable other related hooks from the db one by one (like after_channel_entry_save) and retest, would that be helpful?

#5

BoldMinded (Brian)

Also, version 3.11 is out, you should upgrade to that.

#6

BoldMinded (Brian)

No, don’t disable any hooks. Try to replicate the issue in an EE environment with just Publisher and Structure first.

#7

Jelle / Karres en Brands

hooks re-enabled, updated publisher. issue remains If needed i can zip the whole thing and send it over?

#8

BoldMinded (Brian)

No, that would be the absolute last resort. Please create a clean EE environment with only Publisher and Structure installed to replicate the issue (this is mentioned in the support terms as one of the steps), if you can replicate it in that environment, then we’ll go from there.

#9

BoldMinded (Brian)

I’m going to close this out b/c it’s been a month with no response. If you’re able to replicate it in a clean EE environment and care share the details, or access to that environment, then I can take another look at this.

Login to reply