Problem/Motivation
domain.negotiator injection can return null upon first call, see https://www.drupal.org/project/domain/issues/3226427
Steps to reproduce
Do not have the time to reproduce, but arbirarily started to raise
Error: Call to a member function id() on null in domain_menus_menu_access() (line 372 of modules/contrib/domain_menus/domain_menus.module).
after creation of new menus. Menus are still accessible and usable through other forms, but this error always raises after calling their configuration forms, eg.
admin/structure/menu/manage/
Proposed resolution
A temporary patch is attached, but this issue needs general review for the domain module, see aforementioned issue.
Remaining tasks
Discuss other issue and fix generally. Find a way to reproduce.
Comments
Comment #3
drpldrp commentedI was unable to reproduce the error, but I have added the proposed solution anyways to 3.2.4 because there is nearly no downside to it.
Comment #4
medusa43 commentedThanks for fixing that so fast!
Comment #5
willeaton commentedSorry to reopen this case, as its something very similar it seems to make sense....
We need the same thing in `domain_menus_menu_link_content_access`. I actually have the Domain patch installed as well, which does not fix this point (https://www.drupal.org/files/issues/2021-09-02/domain-prevent_null_activ...)
Comment #7
drpldrp commentedComment #8
drpldrp commented