I found a strange behaviour by using a custom event switcher and a Add system message action.
I put a system message in one of the events created by a custom event switcher.
If I use the Confirm, Notice or Warning message type, everything works as expected.
If I use Error message type, no system message appears in the page.
The page seems to load a little slower than usual, I'm not even sure it is loading, in firebug there's nothing. The page should redirect to self after running the action.
bye
maxx
Hi Maxx,
I've never used that action :-( Looking at the code it calls the JError library - and looking at the Joomla! 2.5 code most of this is marked 'deprecated' - though in the usual Joomla! way it doesn't' appear to point to the replacement code.
Also the JError library seems to be be aimed at tracking and reporting coding errors and may well be over-kill for showing a styled message.
I'd use $mainframe->enqueuemessage('message'); or $mainframe->enqueuemessage('message', 'error'); instead.
Bob
Hi Maxx,
I think that is the correct behaviour . . . I expected it to just show a red message.
Bob
Hello!
I know the subject has started a long time ago, but I have recently experienced this strange behaviour.
If I use a "Confirm", "Notice" or "Warning" system message, the message is shown correctly and the form goes on.
If a use an "Error" message, the web browser wants to load a file (name and extension depend on the browser it seems) and the form is blocked, doesn't want to go to the next page.
I join you a simple example.
Internet Explorer 7 : if I put 10 then a file "index.php" wants to load
Google Chrome : if I put 10 then a file "index.gz" wants to load
It's not a big problem (I use the Warning system message instead of) but a bit strange.
Maybe Max could have a look for the next version or upgrade.
Flo
Hi Flob,
I think this is a result of the way Max chose to code this which calls the Joomla! Error code.
As I said in an earlier post, I'd use $mainframe->enqueuemessage('message', 'error'); instead I think that will give the result you want.
Bob