@viocassel this is NOT a bug:
For the load position:
/**
* Loads and renders the module
*
* @param string $position The position assigned to the module
* @param string $style The style assigned to the module
*
* @return mixed
*
* @since 1.6
*/
protected function _load($position, $style = 'none')
and for the load module:
/**
* This is always going to get the first instance of the module type unless
* there is a title.
*
* @param string $module The module title
* @param string $title The title of the module
* @param string $style The style of the module
*
* @return mixed
*
* @since 1.6
*/
protected function _loadmod($module, $title, $style = 'none')
or both here:
https://github.com/joomla/joomla-cms/blob/staging/plugins/content/loadmodule/loadmodule.php#L122-L163
So both functions can accept one more parameter, style. When empty a null is passed. This was by design NOT a bug
Ho-ho-ho! The code should consider if next parameter exists, isn't it? Functions which you show allow to keep last parameter empty. Why do you argue?
@Ilya-Zhulin to put it simple if empty the value will be none: protected function _loadmod($module, $title, $style = 'none')
, so why spent processing power to take that coma off? It doesn't make any sense...
No problem! If it is hard to devs, we can delete it by self.. Every time, time by time... And.. somewhere in Joomla! 3.5.9 somebody put this if condition...
If you mean that style is neccessary - put 'none' it to code automatically if the style field is empty. To finish frase by comma - that really doesn't make sense
If you are willing to make that change here is the code:
var extraVal;
if (jQuery("#extra_class").val().length)
{
extraVal = "," + jQuery("#extra_class").val();
} else {
extraVal = "";
}
moduleIns = function(type, name) {
parent.window.jInsertEditorText("{loadmodule " + type + "," + name + extraVal + "}", "' . $editor . '");
parent.window.jModalClose();
}
modulePosIns = function(position) {
parent.window.jInsertEditorText("{loadposition " + position + extraVal + "}", "' . $editor . '");
parent.window.jModalClose();
}
should replace these lines: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_modules/views/modules/tmpl/modal.php#L49-L57
Yes, we did it. This post was to remind developers to change it in release.
@Ilya-Zhulin I don't see the PR
ah.. You need PR... Sorry, this id for devs, not from devs. Somewhere I learn JS enough to make pull request for this
@viocassel @joomline @Ilya-Zhulin If you find some time, please test this PR https://issues.joomla.org/tracker/joomla-cms/9117 made by @dgt41 and set the test result in the issue tracker.
@viocassel ... and if all works you can close this issue here
I have tested this. Everything works fine
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-02-14 17:21:17 |
Closed_By | ⇒ | viocassel |
Labels |
Added:
?
|
Yes, I also have this bug.