User tests: Successful: Unsuccessful:
Pull Request for Issue #23584
The variable $hasContent
lets display an editor text when editing a module of the type mod_custom or similar
Although the variable works in back-end for all modules where the manifest contains <customContent />
, it does not work in frontend when editing a module which contains the same element in its manifest.
The code that makes it works in back-end is in the
/administrator/components/com_modules/views/module/tmpl/edit.php
line 24
$hasContent = empty($this->item->module) || isset($this->item->xml->customContent);
In frontend in the file
/components/com_config/view/modules/tmpl/default.php
we have
$hasContent = empty($this->item['module']) || $this->item['module'] === 'custom' || $this->item['module'] === 'mod_custom';
Which means that not all modules which contains <customContent />
in their manifest will display the text editor when edited in frontend.
To solve this issue we have to fetch the manifest of the edited module and check if the element exists in the manifest, same behavior as in back-end.
Therefore this is a BUG and this PR is not a new Feature.
Install the following module, enter some text in the editor field in backend and display it in frontend.
mod_customadv.zip
Set Global Config to let edit Modules in frontend. Login and edit the module.
The editor will not display. It should be below the Options and Advanced parameters.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_config |
Labels |
Added:
?
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks for testing!
RTC. Thanks for testing!
@HLeithner
As this code has been like this for 10 years +, I suggest you merge this PR and I will propose a specific PR for this where it can be discussed.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-02-01 08:41:13 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
thx please create a new PR with the suggest checks/changes
I have tested this item✅ successfully on 34cbf8d
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23604.