Editing a module and try to delete the module position to none
Should be possible to assign a module to position "none" as in previous versions
Module position cannot be set to none.
Joomla 3.9.0, PHP 7.1
Sorry, Joomla 3.9. In 3.8.13 it worked. The choosen element doesn't have the attribute -deselect but in 3.8.13 it has. Unfortunately, I wasn't able to determine in which part of the code the attribute is set (maybe in JS of the choosen library)
Labels |
Added:
J3 Issue
|
In chosen.query.js:
under 3.8.13, this.options.allow_single_deselect
is true
.
under 3.9.0, this.options.allow_single_deselect
is undefined
.
I don't know where this value is set.
I also try to figure that out and cannot find. So I guess, the chosen version has changed and that's the reason.
No change as we can see here:
https://github.com/joomla/joomla-cms/tree/staging/media/jui/js
Mysterious.
I can remember that we have had a similar issue back in a previous version. Unfortunately, I cannot remember which one ;-)
I found a way to solve this. can you test?
Modify
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_modules/views/module/tmpl/edit_positions.php#L26
by using
'id' => 'jform_position_chzn',
// i.e. adding _chzn
to the id
The drawback is that we get in source a double _chzn
for the <div id:
I can get rid of it in chosen.query.js
by taking off + "_chzn"
in
if (this.form_field.id.length) {
container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chzn";
But this may have undesired results.
BTW: I guess same issue when editing modules in frontend.
@infograf768 sorry but the error is not in the chosen file!!!
unset($this->_scripts["/media/system/js/moduleorder.js"]);
and you'll see that the x button reappears. SO whatever was committed in the moduleorder script is wrong
Looking
Labels |
Added:
?
|
I will try
tks
Reverting is the best choice, that field doesn't need to be governed by chosen and if the styling (that was the issue solved there, right?) doesn't fit the rest of the chosen fields just update the CSS. DO NOT add javascript to fix CSS problems...
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-11-12 17:34:38 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | Quy |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22935
Labels |
Removed:
?
|
Which version of Joomla are you referring to?