Support ⇒ Troubleshootings :: Archives ⇒ [Fix - code change] User Info block not updating for new PMs :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexTroubleshootings

Archived ⇒ [Fix - code change] User Info block not updating for new PMs


works fine for me on all of my sites.

sounds like something is wrong with sessions?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


Yep. Same happening for me. Every single user has commented on this problem ... even on 9.0.6

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix / Apache 2.2.6 / MySQL5.0.45 / PHP5.2.5 / CPGNuke9.2.1


It's a tangled web but the most common cause is pop up blockers. Some of them are a bit dumb and block all popups that are part of a page load, this would be enough to stop the PM notifies. You find different results for IE over FireFox as well.

Norton AntiSpam seems to block all pop-ups that are part of page load, this is insane, the contention that all windows opened during a document load are spam is totally unsustainable. In fact, the average user probably has browser blocking and blocking from tool bars like Google or ICQ, there's no need at all for the Norton Anti-Spam blocking at all.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 5.2.1-RELEASE, Apache 1.3.33, MySQL 4.0.16, PHP 4.3.9, DragnFly 9.0.1.1


It's not the popup notification that's the problem. It's the fact that the inbox status says "0 new messages" when infact you've really got two. Sometimes it's the other way around. I've had numerous members of my site commenting on this.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix / Apache 2.2.6 / MySQL5.0.45 / PHP5.2.5 / CPGNuke9.2.1


Reekie_Red wrote
It's not the popup notification that's the problem. It's the fact that the inbox status says "0 new messages" when infact you've really got two. Sometimes it's the other way around. I've had numerous members of my site commenting on this.


Yep exactly the same here. You can go into the database and reset the unread private messages field to 0 but it'd be nice to get a solution to this.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 2.0/MySQL 5.0.18-standard-log/PHP 4.3.11/DF 9.0.6.1


that's the userinfo refresh problem I commented on back in May then if you read back in the topic. Stale data is used in header.php so the popup fires oddly.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 5.2.1-RELEASE, Apache 1.3.33, MySQL 4.0.16, PHP 4.3.9, DragnFly 9.0.1.1


I have to agree it's not a pop-up window issue, it's the fact that the inbox remains at 0 new messages, even when there are new messages.

NEMINI.org, NEMINI.us, NEMINI.info, NYMINI.org

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
1.3.34 (Unix)/4.1.18-standard/4.4.2 /9.1.0.8 CVS


I'm also experiencing the problem on all of my sites. I'll get an email stating that I've received a PM, yet the forums and userblock both report that I have no new messages. If I go to my inbox I see the message there.

Seems to be the same problem everyone is reporting here. Is there a workaround yet?

My DF Sites:
www.azaudi.org | www.azbmw.org

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Suse 2.6.11/2/4.1.10a/4.3.10/9.0.6.1


Just a wild guess: could it be related to the caching-issues discussed here?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/5.0.24/5/9.1 CVS


alva wrote
Just a wild guess: could it be related to the caching-issues discussed here?


Unlikely Alva. It appears it's a server side session issue. The user notification variable (or whatever it is, I haven't dug around for it yet) is only updated when the session times out or the user logs off and logs back in. Generally I'll eventually get my new email notification but it takes about a day.

This is not a popup issue. The forums "new messages" link, the message count block, and the new message popup are all affected in the same way.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Suse 2.6.11/2/4.1.10a/4.3.10/9.0.6.1


I have looked into Modules/Private_Messages and found this code.

In Modules/Private_Messages/init.inc.

line75:
$userdata = session_pagestart($user_ip, PAGE_PRIVMSGS); init_userprefs($userdata);

In Modules/Private_Messages/index.php:

line 19:
require_once('modules/'.$module_name.'/init.inc');

line 47:
if (is_user()) { if ($userdata['user_new_privmsg']) { $l_new_message = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['You_new_pm'] : $lang['You_new_pms'];


Any idea what $userdata is all about?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache/5.0.24/5/9.1 CVS


same problem here..

[www.EnjoyRock.com]-[Music For Clever People]

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Red Hat Linux 9 / Apache 1.3.31 / MySQL 4.0.25-standart - Php: 5.0.4 - Cpg: 9.1.1


any moves to fix this or provide a fix for it?

My DF Sites:
www.azaudi.org | www.azbmw.org

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Suse 2.6.11/2/4.1.10a/4.3.10/9.0.6.1


I just upgraded to 9.0.6.1 from 9.0.3 and now my users do not get the pop-up box either. I seem to remember that I had this issue with 9.0.3 also, and I came here and found some sort of patch/hack, to fix the problem. I cannot find it here now and nobody else seems to either. Did this hack cause some other issues and was therefore taken down?

Anyone know anything about this?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.0.25/4.3.11/9.0.6.1


I figured out what I did in the past to solve the issue. I made my changes in the header.php file in the root directory.

Currently there is the following line of code:

if ($module_name != 'Private_Messages' && is_user() && is_active('Private_Messages') && $userinfo['user_popup_pm'] && $userinfo['user_new_privmsg']) {

The problem is that $userinfo['user_new_privmsg'] is not updated each time the header.php file is called. So the file does not hit the database to find out if there is a new message or not.

In that past I found code to fix this problem and I inserted it into the header.php file and it does make the pop-up work correctly. I took out the code above and put the following in its place.

$get_pm_new = $db->sql_query("SELECT user_new_privmsg FROM cms_users WHERE username='$userinfo[username]'", false, __FILE__,__LINE__); $pm_new = $db->sql_fetchrow($get_pm_new); $get_pm_unread = $db->sql_query("SELECT user_unread_privmsg FROM cms_users WHERE username='$userinfo[username]'", false, __FILE__,__LINE__); $pm_unread = $db->sql_fetchrow($get_pm_unread); $pm = $pm_new[0] + $pm_unread[0]; if ($module_name != 'Private_Messages' && is_user() && is_active('Private_Messages') && $userinfo['user_popup_pm'] && $pm > 0) {

I am not certain if this is really a good way to go about it, but it certainly has worked for me. This suggestion was posted in the past, but I could not find it now. Although the code to put in was posted earlier in this thread, it did not say where to put it.

Maybe someone discoved that this is a very poor way to fix this issue, I am not sure. I would love to hear from one of the developers on this issue.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.0.25/4.3.11/9.0.6.1

All times are UTC