enqueMessage bug?

58 views
Skip to first unread message

Troy Hall

unread,
Mar 12, 2017, 4:33:48 PM3/12/17
to joomla-...@googlegroups.com
am I mistaken or do we have a bug with enqueMessage.
so, the docs state you create an error message like this..
JFactory::getApplication()->enqueueMessage('you forgot to put in the
google font info', 'red');
this will throw the BS2 danger ( alert-red ) box and the Content being
everything before the ,
this works fine EXCEPT, "red" is shown as the title! From my
understanding of the docs
https://docs.joomla.org/Display_error_messages_and_notices
'red' should not be displayed since it is the "type" of warning not the
content.

I have no desire to see the "type" just the red bar with the error message.
Bear

Viper

unread,
Mar 13, 2017, 3:15:03 AM3/13/17
to Joomla! CMS Development
It's not a bug. 'red' is not a type of message.
JFactory::getApplication()->enqueueMessage('Your Message', 'error'); will do that you want.

George Wilson

unread,
Mar 13, 2017, 6:18:04 PM3/13/17
to Joomla! CMS Development
It does both. If you look you'll see the class and the title of the message are the same thing https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/system/message.php#L24 - always have been - and it get's translated using these strings https://github.com/joomla/joomla-cms/blob/staging/language/en-GB/en-GB.ini#L13-L16

Troy Hall

unread,
Mar 13, 2017, 10:47:31 PM3/13/17
to 'George Wilson' via Joomla! CMS Development
agree to what it currently does, but is that really what it should be?  Maybe message,type,title?
Bear
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send email to joomla-...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages