When logging into my Drupal 6.2 site users are met with this text:

1 / 0 <img src="/sites/all/modules/admin_menu/images/icon_users.png" width="16" height="15" alt="Current anonymous / authenticated users" title="Current anonymous / authenticated users" />

The problem lies in that the start and closing brackets <> in the html source code are written as "& l t ;" and "/ & g t ;" (Note: I have inserted blank spaces in the example for you to view the code!).

When googling the internet for drupal icon_users.png I have come across other sites with the same problem.

I have not been able to find any drupal issues regarding this, but will be very greatful for any assistance.

Regards,

Svend

CommentFileSizeAuthor
#66 admin_menu.png18.38 KBAnonymous (not verified)
#45 admin_menu_usr_counter.patch2.31 KBscottrigby
#19 admin_menu.jpg11.6 KBextect
#14 admin_menu_error.jpg52.52 KBdavidseth
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Project: Drupal core » Administration menu
Version: 6.2 » 6.x-1.x-dev
Component: user system » Code

At the minimum, this looks like an admin_menu issue.

sun’s picture

Title: Problems showing icon_users.png » User counter is output on login page for anonymous users
Priority: Normal » Critical

Ugh. Escalating...

pwolanin’s picture

this seems odd to me - the module should never output anything for user's without the permission.

pwolanin’s picture

Status: Active » Postponed (maintainer needs more info)

I don't see the bug - please provide details on how to reproduce.

sun’s picture

Well, it seems to happen on a few pages:
http://osherlibrary.org/?q=user

When I wrote my previous follow-up there actually was another site in Google's index. However, it's no longer there.

@STNyborg: You have the latest official release installed, do you?

sun’s picture

For reference:

<head>
  <title>0 / 0 &lt;img src=&quot;/sites/all/modules/admin_menu/images/icon_users.png&quot; width=&quot;16&quot; height=&quot;15&quot; alt=&quot;Current anonymous / authenticated users&quot; title=&quot;Current anonymous / authenticated users&quot; /&gt; | www.osherlibrary.org</title>
pwolanin’s picture

weird - so looks like it's getting passed though check_plain() and set as the page title.

Are you using a core theme? Are you setting the title in some odd way in your theme?

pillarsdotnet’s picture

Somewhere in the Garland tabs code, the title is being passed through check_plain. I wound up modifying admin_menu.module to reset the title as follows:
$item['title'] = t('Users');

sun’s picture

@pillarsdotnet: It would be great if you could answer the questions. Especially, since you set the version to 6.x-1.x-dev, it's important to know whether you are using the latest development snapshot or one before the first official stable release for 6.x.

EDIT: My fault, it wasn't you who set the version. Anyway, please clarify. Thanks.

pillarsdotnet’s picture

Well, I looked through a lot of code that I don't completely understand. I originally downloaded the recommended version, but I tried again with the -dev module and ran a diff. No change apart from comments that I could see. Anyhow, here is my progress so far if it helps any:

The only place that the admin_menu module sets the title that way is in the admin_menu_translated_menu_link_alter function.

From the API docs, my first conclusion was that the t() function was being misused. It's not designed to handle HTML code, only straight text. So I separated out the $icon_users text so it is outside of the t() function call. But no dice, the raw html still shows up in the admin/user/user page.

Next, I found a place in includes/menu.inc where the results of that function get used, in the _menu_item_localize() function. Following the logic of that function, I first tried adding the following to the admin_menu_translated_menu_link_alter function:

$item['title_callback'] = 'drupal_validate_utf8';
$item['localized_options']['html'] = TRUE;

Still no luck. I ran a few more text searches for $item['title'] and concluded that somewhere in the theme code, it winds up getting used in the page header and the tab header, as well as in the admin menu where it was intended. Perhaps it's a case of namespace pollution? Anyhow, to be consistent with the way the *rest* of drupal treats that variable, I made the following workaround. (Diff against 6.x-1.x-dev version):

diff -ur orig/admin_menu/admin_menu.module patched/admin_menu/admin_menu.module
--- orig/admin_menu/admin_menu.module   2008-06-26 16:08:37.000000000 -0400
+++ patched/admin_menu/admin_menu.module        2008-07-09 17:09:56.000000000 -0400
@@ -262,7 +262,8 @@

     $title = array('@title' => t('Current anonymous / authenticated users'));
     $icon_users = strtr($icon_users, $title);
-    $item['title'] = t('@count-anon / @count-auth !icon', array('@count-anon' => $count_anon, '@count-auth' => $count_auth, '!icon' => $icon_users));
+    $item['picture'] = t('@count-anon / @count-auth ', array('@count-anon' => $count_anon, '@count-auth' => $count_auth)) . $icon_users;
+    $item['title'] = t('Users');
     if (user_access('administer users')) {
       $item['href'] = 'admin/user/user';
     }

(shrug) works for me. Your mileage may vary.

pwolanin’s picture

um, well that code will surely break the functionality. Could you please answer as to whether you are using a core theme?

STNyborg’s picture

SUN: I am using the latest official version "Drupal Administration Menu 6.x-1.0".

In addition I have tried to recreate the error on other pages but without success (!). The error only appears on the user login page (see http://ihsg.agriscience.info/user) [layout and content are still being processed] and apparently only when printing out the stored values $head_title and $title.

pillarsdotnet’s picture

It should have been obvious from my comments, but I am using a fresh install of Drupal (was version 6.2, now version 6.3) and the error appears on the admin/user/user page. I have not (yet) changed from the default Garland theme.

EDIT - rereading, it wasn't obvious. I had originally mentioned Garland but somehow edited out in a later revision of my comment. (I usually preview several times before submitting.)

And yes, I am aware that my change breaks the intended functionality, but imho the browser titlebar is the wrong place to put the number of anon/logged users followed by a graphic icon. So I'd rather drop the feature than break standards. I'm not willing to invest the time to rewrite the otherwise excellent admin_menu module in order to implement a feature that I don't particularly need. So I present my workaround in case anyone else is similarly situated. Note: workaround is different from fix. Hopefully, the module author will provide a fix, which would entail using some other namespace than "title" for his feature, when "title" is so obviously used in areas where a graphic icon will not work.

davidseth’s picture

FileSize
52.52 KB

I am having the same issue. Just upgraded from 6.2 (worked fine) to 6.3 (now the problem mentioned above).

Attached is a screen shot.

bensmiley’s picture

I've found a workaround for this but I'm fairly new to Drupal so I'm not sure if its good programming. I modified the admin_menu_translated_menu_link_alter function in admin_menu.module. On line : 255 I added

global $user;
if(!$user->uid)	
  	$item['title']="Login";

This checks whether the user is logged in, if not it sets the title to "Login" which solves the bug on the user login page. It seems to work ok and is probably useful as a temporary measure.

stephenhay’s picture

I've got the same issue. Subscribing

pwolanin’s picture

I'm still a bit perplexed - this could not ( I think) be happening unless you are setting the active menu somewhere.

When I visit /admin/user/user on my local (D6) install with admin_menu running, I get the expected:

 <title>Users | D6 MAMAP 127.0.0.1</title>
sun’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Active
extect’s picture

FileSize
11.6 KB

Sorry for the duplicates!

Although this issue is caused by Admin Menu it somehow seems to occur only in combination with some other modules. In my case all the problems disappear as soon as I deactivate local menu.
I noticed that some of the sites with this problem are using nice menus.

So, my guess is that the issue appears as soon as there is another module that changes Drupal's menu system in some certain way.
Unfortunately, I wasn't able to find the peace of code that is causing all this.

On my site the problem is not restricted to http://mysite.tld/user. There is also something weird happening at http://mysite.tld/admin. (Look at the block title and the favicon in the breadcrumbs in the attached screenshot)

Two further examples of the error:
http://www.isis.vanderbilt.edu/user
http://www.haase-jaekle.de/drupal6/user

hunthunthunt’s picture

extect, are you certain that the problem is caused by the Administration Menu module? My feeling is that the problem is caused by the Local Menu module and exasperated by the Administration Menu module.

bengtan’s picture

Hi,

Came across this issue from another context.

Setup: Drupal 6.4 with garland theme.
Modules: admin_menu 6.x-1.0, menu_breadcrumb 6-x.1.1

If I install/enable the module menu_breadcrumb, then the issue arises when I visit /admin/user/user and /admin/user/user/create.

If I disable menu_breadcrumb, the issue goes away. If I re-enable menu_breadcrumb, the issue returns.

Perhaps this might be easier for you to reproduce?

Proct0t’s picture

I had the same problem as bengtan above with the same module setup, although on Drupal 6.3. I've tracked it down to the fact that menu_breadcrumb looks up the menu_links table to find out which menu admin/user/user belongs to, and the result is that it belongs to two menus: navigation and admin_menu. Now menu_breadcrumb sets the active menu to the first result, which is somewhat arbitrary and which is probably why the bug is hard to reproduce and why davidseth (at #14) was ok on 6.2 but not 6.3. The desired result is that menu_breadcrumb picks the navigation menu instead of admin_menu, so here's a quick fix:

// menu_breadcrumb.module, line 79
// replace the SQL with
SELECT mlid FROM {menu_links} WHERE menu_name != 'admin_menu' AND link_path = '%s'

I've also looked into local_menu, which I also have installed, and it also sets the active menu in much the same way as menu_breadcrumb, so you may also use the same fix:

// local_menu.module, line 74
// replace the SQL with
SELECT mlid FROM {menu_links} WHERE menu_name != 'admin_menu' AND link_path = '%s' AND hidden <> 1

Both these fixes mean hacking modules, which I know shouldn't be done, but they should work for everyone for now unless you somehow want the active menu set to admin_menu.

In any case this seems more like a compatibility issue than an admin_menu bug since I'm not sure if there's much that can be done on it for a fix. My current thought is that modules such as menu_breadcrumb and local_menu should have options to manually exclude menus when setting the active one. Unless someone can think of a fix for admin_menu itself then perhaps we should open issues with these modules.

Waiting for more comments before re-categorizing this issue...

sun’s picture

Shane, thank you very much for taking the time to track this down. Your findings are very very valuable.

Given these facts, there are only the following possible assumptions:

- Either all contrib modules need to check (exclude) certain conditions when trying to determine the active menu item
- or the menu system in D6 is unable to deliver the proper information
- or admin_menu must not register an existent path that might lead to menu link path clashes
- or admin_menu must not use the menu system at all.

Well, after discussing this thoroughly with smk-ka and reviewing the code of local_menu and menu_breadcrumb modules, we came to the conclusion that both of these modules are improperly querying data from the menu system. The error is caused by this query (in both modules):

SELECT mlid FROM {menu_links} WHERE link_path = '%s'

...which does not check for access permissions (!). Now, this is just the trigger. The real caveat is that those modules are unable to check access permissions in a database query, because the new menu system invokes (arbitrary) callback functions to check whether a user has access to a given path. The required behavior depends on the module's intention, but basically: To get the proper result, they would have to query all possible paths (including parent paths), test whether the current user is allowed to access each path, and return the best match.

sun’s picture

Even more findings, similar issue: http://drupal.org/node/295476#comment-984615

...which would mean that also Token module in D6 is using a wrong database query.

Proct0t’s picture

Daniel, thanks for the quick reply and for also looking into this!

After taking another look at the menu_breadcrumbs and local_menu modules it does seem that they check for access. The sql result is passed to the menu_link_load() function, which calls _menu_link_translate(), which calls _menu_check_access(). I'm pretty sure that this last call does all relevant menu access checks, although I haven't looked at it in-depth or tested it.

In any case I've been thinking about your assumptions and here's my current train of thought. The question "to which menu does this item belong?" is similar to asking "what is the alias to this path?" in that multiple results can be returned in both cases. Now since paths with multiple aliases are not recommended maybe so should items belonging to multiple menus. The conclusion to this is that all the modules in question, including admin_menu, are not properly implemented (admin_menu registers items in a menu that are already in other menus, and the other modules are expecting single results when multiples are sometimes returned). Of course this is not good news for admin_menu since it uses existing menu functions extensively and effectively. In the end I would much rather fix Drupal's menu system to handle items in multiple menus, but I don't think that would happen until D7 or later.

Here's how I see it right now: the easiest way to a fix is to have exclusion lists in all relevant menu-seeking modules; the better fix would be to revamp admin_menu; the right way to fix is to work on Drupal's menu system.

Lastly, I haven't been able to check either 6.x-1.x-dev or 7.x-1.x-dev of admin_menu for this issue (only 6.x-1.0) and I apologize if it has already been taken into account when making these versions.

smk-ka’s picture

Yes, _menu_check_access() gets called, but the result (which is stored as attribute $item['#access']) is never actually used, that's the problem. Instead of using the first database result, the modules should cycle through *all* results and choose the one that fits best.

However, determining the best match seems to be not possible with the current menu system. Ideally, it would implement menu "weights" which would allow modules to determine the best fitting result: the Navigation menu set to very high priority (low weight) because it is usually the best match, followed by other regular menus (or equally weighted), and a very low priority for admin_menu (or even a special "don't use" value for any modules that duplicate the menu tree instead of adding to it).

For now, however, these modules should just try not to pick menu items for which the current user doesn't have access to. IMO this *should* work in 99% of all cases (but haven't tested yet).

Manuel Garcia’s picture

subscribing...

thanks for the quickfix on the database query !

// menu_breadcrumb.module, line 79
// replace the SQL with
SELECT mlid FROM {menu_links} WHERE menu_name != 'admin_menu' AND link_path = '%s'

works in our case.

Previous to doing this, I disabled admin_menu and i got icon_users as the title in the /user page for anonymous users. Don't know if this says anything to you, not a developer but I thought I'd let you know in case it shows a clue of whats happening (using menu_breadcrumb).

Here is a list of all the modules we have currently (on drupal 6.4):

admin_menu
adminrole
advanced_help
bueditor
cck
ccktables
contemplate
custom_breadcrumbs
devel
email
filefield
globalredirect
i18n
imageapi
imagecache
imagefield
imagefieldtable
imce
jstools
languageicons
lightbox2
link
menu_breadcrumb
nice_menus
pathauto
poormanscron
popups
submenutree
taxonomy_manager
token
translation_overview
views
webform

In case it helps, thanks for the effort guys!

STNyborg’s picture

Status: Active » Fixed

Thank you very much for the quickfix to the menu_breadcrumb. Works on my site now...

sun’s picture

Status: Fixed » Active

Sorry, this is not a real solution.

Proct0t’s picture

Nice to see my first (small) contribution to the Drupal community is helping. =) Although I agree that it's only a quickfix.... Created issues for menu_breadcrumb (#303247: Menu Breadcrumb setting active menu to undesirable menus) and local_menu (#303249: Local Menu setting active menu to undesirable menus).

@smk-ka Thanks for correcting me about the access callbacks, I see what's going on now, although I don't believe checking for access is the solution in the end. If a logged-in user has access rights to the admin_menu menu then couldn't the active menu be set to admin_menu? I believe that's what's happening in my case... Anyways, I like your idea about a sort of weighted menu system to fix things across the board.

wuf31’s picture

subscribing..

I'm using menu_breadcrumb here.
Tried the quick fix at #22. Doesn't work.

The fix is by changing the line to read like this:

$menu_link = menu_link_load(db_result(db_query("SELECT mlid FROM {menu_links} WHERE link_path = '%s' AND menu_name <> 'admin_menu'", $menu_item['href'])));

PS: I know it's a dirty fix. But at least it works for the moment.

smk-ka’s picture

@wuf31: Please check the related issue Proct0t created in #30.

redndahead’s picture

I see I should have been following this issue instead of mine. I think the overall problem is that drupal does not have a way to relate node information to a menu item. I think the beginning of a solution is to add a mid column to the node table and upon a save of a node obtain the mid and add it with the node. Then all these modules that are having to do lookups using the path can actually look at a specific node and obtain the exact menu. This would need to be a D7 fix so this is a future fix, but I think it's the right start. One thing I don't necessarily understand is how when you edit a node it always chooses the right menu item in the menu settings box. When I get to work I'll research what they do and see if I need to put in an issue for drupal.

pwolanin’s picture

By design the D6 {menu_links} table can have any number of links pointing to the same path.

The query might be better fixed by writing:

SELECT mlid FROM {menu_links} WHERE module = 'system' AND link_path = '%s'

There should be only one such link in the table.

Anonymous’s picture

subscribe

UniqID’s picture

I'm using Administration Menu 6.x-1.0 and I have the same issue as in #14. In magical way drupal changes chars: <, > into &gt and &lt. I thought this was issue, but the real issue is that non logged user don't have to know how many users are on the site, and how many of them are successfully logged.

On my site I also have menu_breadcrumb and nice_menus, but I don't think they are the main reason.

I fixed it by using #15 (thanks bensmiley) with some changes.

So here it is:

  if ($item['title'] == 'icon_users') {
    global $user;
	if(!$user->uid) {
	  $item['title']="Login";
    } 
	else {
      // Add count of active anonymous/authenticated users.
      // @see user_block(), user.module
      $interval = time() - variable_get('user_block_seconds_online', 900);
      $count_anon = sess_count($interval);
      $count_auth = db_result(db_query("SELECT COUNT(DISTINCT uid) FROM {sessions} WHERE uid > 0 AND timestamp >= %d", $interval));
      $icon_users = '<img src="'. base_path() . drupal_get_path('module', 'admin_menu') .'/images/icon_users.png" width="16" height="15" alt="@title" title="@title" />';
      $title = array('@title' => t('Current anonymous / authenticated users'));
      $icon_users = strtr($icon_users, $title);
      $item['title'] = t('@count-anon / @count-auth !icon', array('@count-anon' => $count_anon, '@count-auth' => $count_auth, '!icon' => $icon_users));
      if (user_access('administer users')) {
        $item['href'] = 'admin/user/user';
      }
	}  
  }

I don't know Drupal very well. In fact this was my first real try to fix something in this CMS. Maybe someone do this better or in right (drupal) way and implement this permanently to this module.

This doesn't fix issue on page /admin/user/user, when user is logged in.

pwolanin’s picture

I think this is not our problem - a bad query in other modules:

#296534: Link paths are not unique for Local Menu module
#303247: Menu Breadcrumb setting active menu to undesirable menus for Menu Breadcrumb module

Proct0t’s picture

well, i've created my very first module to implement the "menu weights" idea that smk-ka has suggested. Of course i've only written this overnight and it's currently of no great quality, but perhaps I could publish it on Drupal as a starting point? My current thought is that that other modules, such as local_menu and token, would depend on this module to solve the dilemma, although I'm unsure if those module owners would be willing to depend on another module like that. The new module would effectively include and replace menu_breadcrumbs. The other possibility is that we patch Drupal itself to put this functionality into core - where I think we agree it belongs. Of course if Drupal were to actually accept this I wouldn't see it happening until D7, leaving us again with the module for now..... Any thoughts would be appreciated.

pwolanin’s picture

@Proct0t - that is not a fix - a single menu may contain multiple links pointing to the same path - BY DESIGN

Proct0t’s picture

The module is to solve the problem of finding the menu that is considered active when a single path is found in multiple menus, which is what we have determined to be the root of the problem, I thought... am I missing something?

petertj’s picture

Subscribing - had the same problem, fixes on #22 and #34 both work for me. Sticking with #34 for now, looking forward to a permanent solution. Thanks to you all for finding decent workarounds in the meantime!

sun’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta
Status: Active » Fixed

Token issue:
#295177: Use proper menu link loading for node menu links

Since this cannot be fixed in admin_menu, and this issue is rather duplicate of the Token, Menu Breadcrumb, and Local menu issues, I would mark it duplicate normally, but sticking to fixed for now.

Proct0t’s picture

@sun - I'm curious to know what you think about having a module like the one I mention in #38 to fix this issue....

alexjhart’s picture

I took bensmiley's approach on #15 and added to it. I was running into the same issue with the login page as the user list page.

in place of

  if ($item['title'] == 'icon_users') {
    // Add count of active anonymous/authenticated users.
    // @see user_block(), user.module
    $interval = time() - variable_get('user_block_seconds_online', 900);
    $count_anon = sess_count($interval);
    $count_auth = db_result(db_query("SELECT COUNT(DISTINCT uid) FROM {sessions} WHERE uid > 0 AND timestamp >= %d", $interval));
    $icon_users = '<img src="'. base_path() . drupal_get_path('module', 'admin_menu') .'/images/icon_users.png" width="16" height="15" alt="@title" title="@title" />';
    $title = array('@title' => t('Current anonymous / authenticated users'));
    $icon_users = strtr($icon_users, $title);
    $item['title'] = t('@count-anon / @count-auth !icon', array('@count-anon' => $count_anon, '@count-auth' => $count_auth, '!icon' => $icon_users));
    if (user_access('administer users')) {
      $item['href'] = 'admin/user/user';
    }
  }

I put the following on line 276

  if ($item['title'] == 'icon_users') {
        $url = request_uri();
        global $user;
        if (strpos($url, "admin/user/user")) {
                $item['title']="Users";
        } elseif (!$user->uid) {
                $item['title']="Login";
        } else {
                    // Add count of active anonymous/authenticated users.
                    // @see user_block(), user.module
                    $interval = time() - variable_get('user_block_seconds_online', 900);
                    $count_anon = sess_count($interval);
                    $count_auth = db_result(db_query("SELECT COUNT(DISTINCT uid) FROM {sessions} WHERE uid > 0 AND timestamp >= %d", $interval));
                    $icon_users = '<img src="'. base_path() . drupal_get_path('module', 'admin_menu') .'/images/icon_users.png" width="16" heigh$
                    $title = array('@title' => t('Current anonymous / authenticated users'));
                    $icon_users = strtr($icon_users, $title);
                    $item['title'] = t('@count-anon / @count-auth !icon', array('@count-anon' => $count_anon, '@count-auth' => $count_auth, '!ic$
                    if (user_access('administer users')) {
                      $item['href'] = 'admin/user/user';
                    }
        }
  }
scottrigby’s picture

Hi,
I can see there's some disagreement about the cause, and best approach to solving this issue.

I've been trying out things myself (with little luck), and also waiting to see a better direction before apply applying any proposed solution, because the problem showed up on the user login page and on the admin user list. But after seeing alexjhart's addition, and trying it -- I can say this works well for me.

Because of this I'm submitting a patch for his code (almost exactly, with a few escaped strings added). I'm adding a patch not because I think this is now completely solved, but it removes some of the most visible problems of admin_menu (for anon users and users with permission to administer other users) without seeming to break anything else -- and (for me anyway) a patch is helpful until there's a better solution... because I use admin_menu on every drupal installation.

Cheers :)
Scott

pwolanin’s picture

The other modules causing these problems have sloppy/wrong code. Please chase their maintainers. admin_menu's code is correct as is.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

mrfelton’s picture

I too am having this problem, using todays dev snapshot. The patch in #45 did fix it, thanks. However, I also see the title "icon_users" on the user login page if I disable admin_menu.

extect’s picture

As admin_menu isn't the cause for the trouble, is there a list of modules available that cause these problems?

bengtan’s picture

@49: Have a look at comment #37. Those two are the most commonly cited cases.

Alauddin’s picture

I used #15 to patch my admin_menu and it works just fine - no 'icon_users' message or anyting like that.

Thanks

inventfilm’s picture

Post #27 worked for me!

McCool’s picture

I've had the same problem.
D6.6, Admin Menu 6.x-1.1, and I had Node Breadcrumb 6.x-1.0-beta2 installed.
After reading this thread I disabled Node Breadcrumb, and the problem has gone.
Many thanks, and hope this helps to add to the knowledge on the issue.

JonesUI’s picture

If you are using Menu Breadcrumb, check out this thread: http://drupal.org/node/303247 and try the patch listed on post #13.

It solved the problem on my Drupal 6.8 site.

codybarr’s picture

I'm also having the same problem, but with Node Breadcrumb Module. Created an issue on their project page: #353519: Admin Menu Module Conflict - User Login Page

sziggle’s picture

i was having the same issue between menu breadcrumb and admin menu. i used #22 above and that fixed the problem for me. i wish i had more time to dig into the meat of it, but i needed a quick fix and that did it.

thanks Proct0t

radj’s picture

#22 worked for me, too. FYI.

doughold’s picture

#27 worked for me! Thanks!

xurizaemon’s picture

Patch #27 from http://drupal.org/node/303247 worked for me too.

aharl’s picture

This seems to only be an issue with the Zen theme/subthemes. Is anyone else seeing this in any other themes?
#293154: Conflict between Zen and Admin Menu

sammos’s picture

I have several D6 sites I've encountered this with and I've done some pretty extensive testing...
The issue is not with Zen or with Admin_menu..... at least, not Admin_menu alone. It's a conflict with Admin_menu and various other modules - one thread tracks it back to something that really should be fixed in the D6 menu system sorry I lost track of that thread or I would link to it here.

In my case it's menu breadcrumb module. If I turn off menu_breadcrumb but leave admin_menu turned on, there is no issue - the user/login page when viewing anonymously prints the User Login title instead of the Only local images are allowed. tag that prints when both Menu Breadcrumb and Admin Menu are turned on.

While the Only local images are allowed. may or may not print in Garland (I am not sure) I do know that when Menu Breadcrumb is ON but Admin_menu is OFF then you see user_icon print instead of Only local images are allowed. and this behavior is the same on Garland theme too.

m.rademacher’s picture

Patch #27 worked for me. I am somewhat alarmed at the lack of progress on this module, however. Any way to find someone to co-maintain?

sun’s picture

@m.rademacher: Obviously you failed to read the comment http://drupal.org/node/493236#comment-1708616. You applied the wrong patch for the wrong module and blame the wrong people for something wrong in some other wrong modules. Thanks.

m.rademacher’s picture

@sun: Apologies for all the "wrongs" I committed. While I feel that your tone is unwarranted, I do admit my mistake. I accidentally post here instead of in the menu_breadcrumb thread. It was an innocent mistake, my problem is resolved (based on the patch in #27 from http://drupal.org/node/303247). However, I intended to ask if there was a way to help get a co-maintainer added to menu_breadcrumb, since the last update to the dev version was Feb 2009. This patch was originally posted in March 2009, and I was worried that this module (menu_breadcrumb, not admin_menu) is in danger of becoming abandoned, and I like it's functionality.

Again, I apologize for my mistake, I clicked reply in the wrong thread.

thejtate’s picture

Post #27 worked for me as well, thanks for the fix. :)

Anonymous’s picture

FileSize
18.38 KB

#27 saved the day!

OldAccount’s picture

None of the solutions above worked for me, but I had luck with this (adding a preprocess function):
http://thedrupalblog.com/resolving-page-title-issues-caused-menu-breadcr...

As a quick solution, I added some code to my theme template.php file in a preprocess_page function to replace the titles.

<?php
function MYTHEME_preprocess_page(&$variables) {
  if (stripos($variables['head_title'],'icon_users.png')) {
    $variables['head_title'] = 'User account | ' . variable_get('site_name', '');
  }
  if (stripos($variables['title'],'icon_users.png')) {
    $variables['title'] = 'User account';
  }
}
?>
Adam S’s picture

I have this same problem using the node breadcrumb module 6.x-1.0-beta4. Because all the modules have been updated since you have published your fixes I am not sure which lines to change. I forgot to add, it only effects admin/user/user not the login page which is a good thing.

xurizaemon’s picture

Adam S’s picture

Thanks, buddy. It worked like a charm :) Could you please fix all the other bugs in my system while you're at it?

celstonvml’s picture

Subscribe

zejkee’s picture

Version: 6.x-1.0-beta » 6.x-1.5

Thx, solution in #15 works like needed

aschiwi’s picture

Just wanted to add that the original issue of this thread also happens with custom_breadcrumbs module. Turning off admin_menu makes the img markup go away but the text then still says "icon_users". Turning off nice_menus does not do anything in resolving this. Turning off custom_breadcrumbs makes this go away (but that's not an option for me). Does that make this an issue for custom_breadcrumbs and menu_breadcrumb?

aschiwi’s picture

This problem is gone with Admin Menu 6.x-3.0-alpha3 (which has problems of its own, one I know of is the "You do not have any administrative items." message at /admin, which is described here: http://drupal.org/node/511744)

josepvalls’s picture

Just for the record, I had the same issue in a foreign mywebsite. My workaround was to use the translation interface to translate the "@count-anon / @count-auth !icon" string into something else for my language.
I'll wait until the beta gets stable for the real fix.
Hope it helps someone.

Sborsody’s picture

This thread has gotten so long that something isn't clear to me. There's both patches for admin_menu and patches for menu breadcrumb. Someone wrote above that this is fixed in admin_menu 3.0 alpha3. Over on the menu breadcrumb issue they say the issue is fixed in dev. Which do I apply? How can the issue be fixed by both if it is caused by something done in menu breadcrumb? Could someone summarize and clarify?

My goal is merely to have this messed up title not displayed on the login page. It is rather silly if you do a google search on the exposed HTML markup because google returns all these Drupal sites that have this displayed on the login page. I'm assuming that whatever the fix is means that the user count is not displayed at all on the login page as that isn't something I think should be displayed there.

Results 1 - 10 of about 5,070 for <img src="/sites/all/modules/admin_menu/images/icon_users.png" width="16" height="15" alt="Current anonymous / authenticated users" title="Current anonymous / authenticated users" />. (0.16 seconds)
cbassig’s picture

@Sborsody - I am not sure if this has been patched in any of the current releases but I just had this problem when I started using menu breadcrumb. Using the latest recommended version of both modules. I followed the comment on #27 and it solved the problem for me.

If your still having the problem, I would just follow #27.

Sborsody’s picture

Thanks!

pwilson’s picture

I found that setting the "Exclude Paths" to "user" fixes this issue when caused by the custom_breadcrumbs module.

bobby123’s picture

Thanks man..I've had the same problem.
D6.6, Admin Menu 6.x-1.1, and I had Node Breadcrumb 6.x-1.0-beta2 installed.
After reading this thread I disabled Node Breadcrumb, and the problem has gone.hope this helps to add to the knowledge on the issue.
i will submit website in the future for other issues

Harry Slaughter’s picture

disabling the buggy menu_breadcrumb module is one potential fix for this problem

xurizaemon’s picture

@Harry S - you're still seeing this issue with Admin Menu & Menu Breadcrumb 6.x-1.2?

Menu Breadcrumb provides admin settings to prevent it messing with your Admin Menu menu (as of about 6mo ago). #303247: Menu Breadcrumb setting active menu to undesirable menus and #595282: Menu weights should have resolved that - let us know if it didn't.

stewsnooze’s picture

Status: Closed (fixed) » Needs work

This problem is not just with those modules. It is more widespread.

Here is the output from my drush statusmodules command. I still get this problem

drush statusmodules --pipe --type="module" --status="enabled"

adminrole
admin_menu
content
content_copy
fieldgroup
filefield
imagefield
link
nodereference
noderelationships
number
optionwidgets
text
ctools
views_content
context
context_ui
color
comment
dblog
help
menu
path
statistics
taxonomy
update
block
filter
node
system
user
date
date_api
date_timezone
devel
devel_generate
devel_themer
zenophile
imageapi
imageapi_imagemagick
imagecache
imagecache_ui
modalframe
nodequeue
advanced_help
better_formats
comment_notify
forward
globalredirect
imce
ib_most
mollom
pathauto
token
imce_wysiwyg
jquery_ui
jquery_update
vertical_tabs
wysiwyg
views
views_export
views_ui

ttamniwdoog’s picture

#67 @lrobeson fix in template.php works for me and no core hacks needed. Thanks.

mattiasj’s picture

#67 worked for me aswell. Thanks.

Danny Englander’s picture

#67 will solve my issue, however I already have a preprocess_page function in template.php using "$hook and $vars". I can't seem to combine them with success to "$variables"

My current code is:

function mytheme_preprocess_page(&$vars, $hook)

... so if I try this:

function mytheme_preprocess_page(&$vars, $hook, $variables)

it does not work. I have tried different combinations of the code but no luck.

sun’s picture

Status: Needs work » Closed (won't fix)

Marking as duplicate of #279767: User counter is output on login page for anonymous users, which is in turn a duplicate of issues for the following third-party modules:

#296534: Link paths are not unique for Local Menu module
#303247: Menu Breadcrumb setting active menu to undesirable menus for Menu Breadcrumb module
#295177: Use proper menu link loading for node menu links for Token module

This bug cannot be fixed in Administration menu. Please check whether you have one of the mentioned modules installed, apply the corresponding patch for it, and report back in the corresponding issue whether it solved this issue for you.

jeffschuler’s picture

@highrockmedia: Leave your function parameters as they are; just replace each $variables in the code provided with $vars.

jeffschuler’s picture

Status: Closed (won't fix) » Active

@sun: it looks like you're marking this as a duplicate of itself...?

Danny Englander’s picture

@jeffschuler, thanks that did the trick (#88).

rerooting’s picture

#67 + #88 worked for me! Thanks for that last tip, Jeff! This was causing some issues on some of our live sites, and search engines like to index the login page - and it looks terrible!

Anticosti’s picture

Issue finally fixed for me:
Don't know if that will help but... I encountered the same issue while working on a new site (not yet online) and... my solution has been to:
delete and reinstall Context and Chaos tools.

Note:
Try Googlin' this:
admin_menu/images/icon_users.png" width="16" height="15" alt="Current anonymous / authenticated users" title="Current anonymous / authenticated users" />

You'll get quite a hugue amount of sites encountering the same issue :(
(7 440 results)

sun’s picture

Status: Active » Closed (works as designed)

See #87.

To repeat:

This bug is not caused by Administration menu. Please check whether you have one of the mentioned modules installed, apply the corresponding patch for it, and report back in the corresponding issue whether it solved this issue for you.

wojtha’s picture

joelstein’s picture

Like #92, I had this same problem, but it was due to Context, and happens when a menu condition is defined in one of my contexts. The solution doesn't involve reinstalling Context and Ctools, but rather applying the patch at #94 above.

eelkeblok’s picture

Subscribing

uberEllis’s picture

Subscribing

rplescia’s picture

subscribe

Luukyb’s picture

The fix of #67 + #88 are working for me too.
Thanks to lrobeson and jeffschuler

<?php
function mytheme_preprocess_page(&$vars, $hook) {
  if (stripos($vars['head_title'],'icon_users.png')) {
    $vars['head_title'] = 'User account | ' . variable_get('site_name', '');
  }
  if (stripos($vars['title'],'icon_users.png')) {
    $vars['title'] = 'User account';
  }
}
?>
msathesh’s picture

#45 patch worked for me.. I don't know why this issue is not committed..

wojtha’s picture

@msathesh it is not commited, because it is NOT the issue of the admin menu, please read #279767-93: User counter is output on login page for anonymous users and #279767-94: User counter is output on login page for anonymous users

bkosborne’s picture

+1

doublejosh’s picture

Issue is still alive. Fixed with theme solution :(
No Menu or Node Breadcrumb on my site. Menu Position (but that didn't cause it.)

In my situation the title was set to "icon_users" when Admin Menu was disabled.

ptahme’s picture

I had the same issue, until I've disabled Custom Breadcrumbs module. Not sure if this issue is still present in current version of that module, but this information may help.

anthony0perez’s picture

Seems odd that only admin menu and then these other modules seem to make this act up. I have all of these set up context module admin module and breadcrumbs module. I uninstall all of them it fixes it. I re install all of them it comes back and then when I just get rid of one at a time start with context then admin then bread. As I go threw these the error or whatever you want to call it goes away only with admin menu. So I can have all the others but admin menu b/c I just don't want to display that as my title on user pages.

rerooting’s picture

Make sure you are following #87 as the fix for this requires patches to either Menu Breadcrumb, Local Menu or Token.