Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
warning: strtr() expects parameter 1 to be string, array given in [...]/includes/common.inc on line 946.
The error occurs on PHP 5.3 when visiting user/registrer
Here's an excerpt from the backtrace:
[16] => Array
(
[function] => accountmenu_translated_menu_link_alter
[args] => Array
(
[0] => Array
(
[load_functions] => Array
(
[1] => user_uid_optional_load
)
[to_arg_functions] => a:1:{i:1;s:24:"user_uid_optional_to_arg";}
[access_callback] => user_view_access
[access_arguments] => a:1:{i:0;i:1;}
[page_callback] => realname_user_view
[page_arguments] => a:1:{i:0;i:1;}
[title] => My account
[title_callback] => realname_user_page_title
[title_arguments] => a:1:{i:0;i:1;}
[type] => 6
[description] =>
[menu_name] => accountmenu
[mlid] => 1504
[plid] => 0
[link_path] => user/%
[router_path] => user/%
[link_title] => My account
[options] => Array
(
[alter] => 1
[attributes] => Array
(
[title] => View/edit user account.
)
[accountmenu_link_title] => My account
)
[module] => accountmenu
[hidden] => 0
[external] => 0
[has_children] => 0
[expanded] => 0
[weight] => 0
[depth] => 1
[customized] => 0
[p1] => 1504
[p2] => 0
[p3] => 0
[p4] => 0
[p5] => 0
[p6] => 0
[p7] => 0
[p8] => 0
[p9] => 0
[updated] => 0
[in_active_trail] =>
[href] => user/0
[access] =>
)
[1] => Array
(
[0] => user
[1] => stdClass Object
(
[uid] => 0
[name] =>
[pass] =>
[mail] =>
[mode] => 0
[sort] => 0
[threshold] => 0
[theme] =>
[signature] =>
[signature_format] => 0
[created] => 0
[access] => 0
[login] => 0
[status] => 0
[timezone] =>
[language] =>
[picture] =>
[init] =>
[data] =>
[timezone_name] =>
[roles] => Array
(
[1] => anonymous user
)
[realname] =>
)
)
)
)
[17] => Array
(
[file] => [...]/sites/all/modules/accountmenu/accountmenu.module
[line] => 162
[function] => t
[args] => Array
(
[0] =>
[1] => Array
(
[@name] =>
[@realname] =>
[!name] =>
[!realname] =>
)
)
)
[18] => Array
(
[file] => [...]/includes/common.inc
[line] => 946
[function] => strtr
[args] => Array
(
Comments
Comment #1
anrikun CreditAttribution: anrikun commentedActually it happens on almost all the pages.
Comment #2
mattyoung CreditAttribution: mattyoung commentedLooks like you were accessing the page as "anonymous user", but the error is in processing the "My account" menu. This doesn't make sense. This menu should not be accessible by the anonymous user.
Can you confirm if you were logged in or not?
What happen if you go to path /user?
Comment #3
mattyoung CreditAttribution: mattyoung commentedClosed because got no feedback
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm getting same error, my dblog is full of this error.
common.inc file 945. line strtr() expects parameter 1 to be string, array given.
Comment #5
mattyoung CreditAttribution: mattyoung commentedThe problem should be fixed in the May-20 dev version. Give that a try. If the problem is gone, I'll make a release.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you, that solved my problem.
Comment #7
Guty CreditAttribution: Guty commentedThank you. This also solved my issue with "strtr() expects parameter 1 to be string, array given in [...]/includes/common.inc on line 944".
Google is able to find lots of pages with turned on error messages if you are googling for '/includes/common.inc on line 944'.
The only way to trigger this error on my page is to switch from English to another language with a user which has role guest.
Comment #8
PvO CreditAttribution: PvO commentedPfffff finally someone pointed me to this issue. Installation of dev version solved my problem with strtr().
Comment #9
roball CreditAttribution: roball commentedWith Drupal 6.24 the error message is
Comment #10
roball CreditAttribution: roball commentedCan confirm that the 6.x-1.x-dev (2011-May-21) version fixes that annoying problem of having the dblog bloated with the error messages mentioned above. Please release 6.x-1.9, as promised on 22 May 2011, thanks.
Comment #11
mattyoung CreditAttribution: mattyoung commentedOkay, I made a new release fixing this problem. Sorry about the delay. I'm on a spiritual journey right now deep inside Mt. Emei Sichuan, China. Only have sporadic network access.
If there is any problem with this release, please re-open this issue.
Also, is there anyone can help me co-maintain and upgrade this module while i'm out on this "wild goose chase"?
Comment #12
roball CreditAttribution: roball commentedThanks a lot for the release - it's working fine. And gain much spirit!
Comment #14
Jevedor CreditAttribution: Jevedor commentedI don't know if something has changed but I am running 6.24 on a php5.3 local installation. This error has reappeared. Did a recent Drupal core update remove this old fix?
Comment #15
Jevedor CreditAttribution: Jevedor commentedDisregard. I am running an old version of pathauto.