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: Error message upon install

Status Resolved
Add-on / Version Publisher 2.6.4
Severity
EE Version 3.5.11

Fifth Ring

Oct 19, 2017

Description:
When installing publisher on a local version of my site, I receive the error:
“Fatal error: Call to a member function getId() on null in /Users/***/Sites/***.com/web/system/user/addons/publisher/Service/Field/Type/AssetsType.php on line 249”
All add-ons are up-to-date as well as EE . When navigating to the previous page, I can see Publisher has been installed but has changed attributes of several pages - the most noticeable being the “Hide from nav” option from Structure.

#1

BoldMinded (Brian)

I just did a fresh install of Assets, and then installed Publisher, and did not encounter this error.

Can you provide more information about this statement? Is something not working as expected? “changed attributes of several pages - the most noticeable being the “Hide from nav” option from Structure.”

#2

BoldMinded (Brian)

Comment has been marked private.

#3

Fifth Ring

Thanks for your help on this, it’s much appreciated. I tried that build and still receive the error message: “Fatal error: Call to a member function getId() on null in /Users//Sites/.com/web/system/user/addons/publisher/Service/Field/Type/AssetsType.php on line 249” We have structure installed and use the “Hide from nav” option within entries to specify which will and won’t be visible on the navigation menus. When publisher is installed, various entries have this value changed from “yes” to “no” and can be seen on the navigation.

#4

BoldMinded (Brian)

Did you also grab the latest version of Structure and run the Publisher updates? I tried to replicate this locally by un-installing Publisher and re-installing, and it is respecting the previously set values by Structure.

#5

Fifth Ring

Hello there, Yes Structure is up-to-date and i ran the publisher updates as well but the error still appears on install. Thanks

#6

BoldMinded (Brian)

So there are numerous entries who have their “hide in nav” setting set to either yes or no, and after the installation, they are set to the opposite?

Can you find the entry in the exp_publisher_titles table and see what the value of the hide_in_nav column is (should be null)?

Are you using any custom layouts? Or is the hide in nav field being displayed in the Structure tab as it should be when you installed Structure?

#7

Fifth Ring

Hi Brian, yes that is correct. After installation, that field value has been changed. In the exp_publisher_titles table, every row has the value ‘n’ for hide_in_nav. We are using custom layouts but this has not edited the Structure tab where “Hide In Nav” is displayed as it was upon first install. Are you able to shed some light on the meaning of the error message we receive upon install of Publisher? “Fatal error: Call to a member function getId() on null in /Users//Sites/.com/web/system/user/addons/publisher/Service/Field/Type/AssetsType.php on line 249” Thanks.

#8

BoldMinded (Brian)

I’m still unable to replicate either issue, so shedding light on it is difficult if I can’t replicate the problem. Just did 2 installs and neither of them set the hide_in_nav column in the publisher_titles table to any value other than null. I searched the codebase and there are no instances of it setting that column value during the install process. Publisher 2.6.4 had the database column default value set to “n”, but the 2.6.5 build I sent earlier changes the default to null. So there isn’t any reason a new install will set it to to “n” or “y”. Did you un-install and re-install Publisher from scratch?

Regarding the getId() error, again, I’m unable to replicate. I assume you had Assets installed first and then you installed Publisher? I tried it both directions… Assets installed then installed Publisher, then the other way around, and I’m still unable to replicate the issue. What version of PHP are you using?

The next comment will have a link to a new build with a comment on how to manually fix the Assets issue. For whatever reason its not finding the default language, so its throwing the error. My only suspicion is that Publisher is not getting to complete its entire install process…. something else is happening incorrectly. Are you sure that Publisher has English in the exp_publisher_languages table when the Assets error happens?

#9

BoldMinded (Brian)

Comment has been marked private.

#10

BoldMinded (Brian)

Did my last suggestion get you past the Assets error?

#11

BoldMinded (Brian)

Closing this b/c I haven’t heard back. Feel free to re-open if the issue persists.

Login to reply