User tests: Successful: Unsuccessful:
Pull Request for Issue #20719
Make JHtml::_('behavior.core');
also load language strings used by core.js
JText::script('ERROR');
JText::script('INFO');
JText::script('NOTICE');
JText::script('MESSAGE');
JText::script('WARNING');
A backend message should show as title
Success instead of success
Warning instead of warning
notice the capital letter to know that translation is working
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Did you test this?
No,
i was interrupted by a small kid,
was going to do it as soon as i returned
I get a fatal error as soon as it is applied
The reason that this does not work is because of an infinite call loop between:
JText::script('...');
HTMLHelper::_('behavior.core');
Labels |
Added:
?
|
Infinite loop broken,
but i do not like adding 1 more parameter to the signature of method JText:script()
any better suggestions are welcome
Instead of creating a new parameter you may use a static variable to check if HTMLHelper::_('behavior.core');
already get called in the script function
Instead of creating a new parameter you may use a static variable to check if HTMLHelper::_('behavior.core'); already get called in the script function
Thanks, an extra note
the above is guaranteed to work only if you place the change of the variable to true, before any call to HTMLHelper::_('behavior.core');
otherwise you will still get a loop if the first call to JText::script() is made by HTMLHelper::_('behavior.core');
itself
Thanks anyone spending time on this PR
No interest in spending more on it by me
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-16 05:38:54 |
Closed_By | ⇒ | ggppdk |
I have tested this item? unsuccessfully on 49ef2cd
Did you test this? I get a fatal error as soon as it is applied
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20721.