Closed (fixed)
Project:
modr8
Version:
5.x-2.3
Component:
User interface
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2007 at 18:42 UTC
Updated:
23 Apr 2008 at 02:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedThis is becaase of a quirk in drupal_set_message(). It's harmless, but can be annoying. You can change this by overriding the theme function:
Comment #2
inforeto commentedHow about theming the same message when appearing in odd places, like in search results, or in admin/logs/status after a manual cron?
Are these cases related to modr8? It shouldn't appear even a single time on these pages.
Comment #3
pwolanin commentedThe patch here: http://drupal.org/node/123994
Seems to help this problem as well.
Comment #4
alanburke commentedHi Pwolanin,
I've tested the patch over at http://drupal.org/node/123994.
It doesn't help me out in this instance.
[I have some complicated (read: not perfect) tpl.php files, so my previews don't work at all, but thats for another day and another issue]
Overriding the theme function will help to a degree, in that I can disable the drupal_set_message call.
It seems that the theme function is being called multiple times.
I think its at the 'view' op, line 126 of the modr8.module.
In some cases the 'view' op and 'insert' op are both being called, hence even more instances of drupal_set_message.
I have a suspicion that the reason for the multiple appearances of the message is that I have about 6 different 'roles' on the site.
But I'm not sure.
Happy to keep testing!
Alan
Comment #5
memenoje commentedHi Pwolanin,
I change theme function in modr8.module, but now this message (The post has been submitted....) 5 times is displayed :-(
Comment #6
personman commentedI'm also having this problem using 2.2. I'm using modr8 with the Classified Ads module and after submitting an ad, I see the message 3 times.
Comment #7
personman commentedHere's my ugly little solution for this:
Comment #8
personman commentedSorry, that should be empty, not !empty. And there are still 2 of the messages, but it's better than 3 or 5.
Comment #9
pwolanin commentedbetter to use a static variable than a global, I think.
Comment #10
gmayes commentedThanks personman for sharing something a bit better!
Has anyone figured out how to remove this message entirely from the search results page and any other places where it shouldn't be? I tried the patch listed earlier to no avail.
Best, Geoff
Comment #11
halfiranian commentedI would really appreciate any ideas on how to get rid of messages in the wrong place/multiple messages.
Thanks
Comment #12
Biteme commentedI got around this with a theme function in template.php that stops all 5 error messages. An info message still shows up, so I figured I could do without them:
Comment #13
.carey commentedThis code works great, Biteme.
Can you, or anyone else, help me to get it to work with more than one content type. It seems when I duplicate the php code in my template.php file and change the content type I get a "duplicate code" error message.
Comment #14
jody lynnOk, let's get this patched in the module so we don't have to do these theme overrides to get around the bug. This patch is working for me.
Comment #15
pwolanin commentedok, that's a nice simple fix.
Comment #16
pwolanin commentedbetter version, committed to 5.x. Please test: http://drupal.org/node/244303
Comment #17
pwolanin commentedpatch committed to 6.x (HEAD)
Comment #18
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.