When only one language is installed and the site is setup to translate local tasks we see errors like:

Notice: Trying to get property of non-object in admin_language_menu_local_tasks_alter() (line 81 of /sites/all/modules/contrib/admin_language/admin_language.module).
Notice: Trying to get property of non-object in entity_get_info() (line 7836 o/includes/common.inc).

CommentFileSizeAuthor
#4 interdiff-02-04.txt808 bytesdmsmidt
#4 2876255-04.patch1.33 KBdmsmidt
#3 2876255-02.patch1.31 KBdmsmidt

Comments

dmsmidt created an issue. See original summary.

dmsmidt’s picture

Status: Active » Needs review
dmsmidt’s picture

StatusFileSize
new1.31 KB
dmsmidt’s picture

StatusFileSize
new1.33 KB
new808 bytes

Better language difference check.

l0ke’s picture

Status: Needs review » Reviewed & tested by the community

Patch is working and looks good to me.

dmsmidt’s picture

Thanks for testing.
I understand this issue is present in a rare case.
In our case we have multiple sites with the same setup and site owners can chose how many languages to use.

  • Liam Morland committed c61b323 on 7.x-1.x authored by dmsmidt
    Issue #2876255 by dmsmidt, l0ke: Remove non-object errors when single...
liam morland’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.