1

I use Privatemsg on my site to allow users to communicate with one another. New messages appear in the "Inbox" tab.

I also have the Menu Badges module installed to have a count of unread messages displayed in a badge. The Tab Menu Badges edit page does not list the inbox path (it's /messages/received). It lists other paths like /messages/list, /messages/blocked, /messages/sent, etc. (all being Privatemsg paths). But there is no path for Received messages.

So, I cannot display a badge on the inbox tab.

Is this a common error? Is there a fix or a workaround for this?

1

If you don't want to use that "scotch tape" anymore (as in your own answer), then have a look at some of the comments in issue # 1719112, which detail how you may get it to work "as it is supposed to work":

  • (Comment # 6): The tab menu badges are meant for tabs specifically, not links in the menu. You need to edit the Messages menu item and select a badge there if you want the badge to appear up in your header.
  • (Comment # 9) You have to create your own menu item. Disable the one created by Privatemsg.
1

After peeking into the database, it appears the path /messages/received does not exist. This is probably due to the fact that the inbox being the first tab (default tab,) the path defaults to /messages. This path is also the path of the main menu tab. The Menu Badge module does not have an uninstall file, therefore uninstalling it does not clear up the database.

The work around I used is by putting the badge on the All Messages tab (/messages/list) The count of unread messages is the same as with the Inbox tab. Then, I used a little css to move the badge 222px to the left (position: relative) so that it falls on the Inbox tab instead.

It's like using scotch tape, but it works. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.