No announcement yet.

Message Center - count of inbox messages not consistent with message list

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Bug / Issue] Message Center - count of inbox messages not consistent with message list

    Hey vBulletin community,
    We are happily working with vbulletin software since version 3 to actual version 5. Time is going on..

    We have some problem with the new message center. The count of the user inbox messages ($userinfo['pmtotal']) is bigger than the list of messages on the inbox page.

    Our debugging brought us to 2 methods:
    1. vBForum:listPrivateMessages gives less messages (this method is used to list the messages)

    2. vBForum:getUserPmFoldersCount - here the count of messages in messages folder is bigger. ($userinfo['pmtotal']).
    That count is used to check pmquota-limits too, just for information.

    The Queries (with small changes for better debugging):

    1. vBForum:listPrivateMessages:

    SELECT node.title, node.nodeid, node.starter, i.* #COUNT(*)
    FROM vb3_messagefolder AS folder
    INNER JOIN vb3_sentto AS s ON s.folderid = folder.folderid AND s.deleted = 0
    INNER JOIN vb3_node AS node ON node.nodeid = s.nodeid AND node.nodeid = node.starter
    INNER JOIN vb3_text AS text ON text.nodeid = node.lastcontentid
    LEFT JOIN vb3_userlist AS i ON i.userid = s.userid AND i.relationid = node.userid AND i.type = 'ignore'
    s.userid = 1
    AND s.folderid = 7714
    AND i.type IS NULL
    2. vBForum:getUserPmFoldersCount:

    SELECT s.*, n.title, n.description, n.nodeid
    FROM vb3_sentto s
    JOIN vb3_node n ON n.nodeid = s.nodeid
    WHERE s.userid = 1
    AND s.folderid = 7714

    So the problem exists probably here: AND node.nodeid = node.starter - that condition is made only by the listing-fetch-query and not by folder-count-queries.

    Could you give us some feedback, why only the starter nodes are listed as messages? Is it bug or on purpose? Which count is correct?

    That's serious bug in the logic and we cannot go online with vB5 and faulty message center.

    Any help will be appreciated,

    Best regards,

    PS. Sorry for my englisch, thats my first post here and first post of englisch since many many years :-)

  • #2
    We count topics for private messages. This is based on the starter. Individual replies are no longer counted separately. The change was made to facilitate the vB Messenger feature which provides an interface that is closer to real-time chat and messages can accrue quickly.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API


    Related Topics