Go to Global Configuration. Click on Permissions tab.
Text from the Text Filters tab is also shown on the Permissions tab.
See screenshot.
Current nightly build (4 Dec 2016). Default template.
Labels |
Added:
?
|
Status | New | ⇒ | Confirmed |
Labels |
Added:
?
|
Category | ⇒ | UI/UX |
$this
is shared among templates (e.g. it contains $this->form),
-- and it ($this) is passed as "$displaydata" to the templates
any variable you set in a previous template is accessible by subsequently loaded templates,
Meaning:
-- the template files should never assume that a variable will not be set if they do not set it !
some previously loaded template may have already set this particular variable
This might explain why the text on the bottom of the permissions tan is
also wrong. @jeckodevelopment reported that a long time ago
On 8 Dec 2016 1:27 p.m., "Georgios Papadakis" notifications@github.com
wrote:
$this
is shared among templates (e.g. it contains $this->form),
-- and it ($this) is passed as "$displaydata" to the templatesany variable you set in a previous template is accessible by subsequently
loaded templates,Meaning:
-- the template files should never assume that a variable will not be
set if the do not set it !some previously loaded template may have already set this particular
variable—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13083 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8W6NVpmrOD0P3Cxm-qDo1lBGyPQOks5rGAWogaJpZM4LDmMc
.
So the template files: like
com_config/view/application/tmpl/default_filters.php
com_config/view/application/tmpl/default_permissions.php
are passing "$this" as "$displayData" to the layout file:
layouts/joomla/content/options_default.php
and this was done deliberately, right ?
-- to avoid creating a new "$displayData" every time, and every time, reassigning variables like ->form ?
-- and also to be able to pass data from 1 template file to the next ?
So this behaviour, is not something to be changed (since it may create more bugs, and also similar code is used everywhere ?)
Only thing is that templates should not assume that a variable is not set into $this, if they do not set it
e.g. in this case as zero-24 said, this fixes it:
$this->description = '';
I argue it is probably proper thing to do now, instead of something that else that may create more problems
A complete crap decision was made to just pass the view object into the layout files all throughout the admin (both MVC structures). It's caused more issues than it's worth and honestly is worth the B/C break in 4.0 to clean up. #11054 is another case where this decision has bitten us in the rear end.
It's caused more issues than it's worth and honestly is worth the B/C break in 4.0 to clean up.
yes, it is as you say, but as you also say any such change should be better be in 4.0
It is not "urgent" / important to change this in J3.x
i feel it will be too much work, and too much testings time to change this in J3.x (everywhere),
because creating a new object to pass to the layouts and then forgeting to set a variable,
and we have a new bug
i forgot
it is also a B/C break (as mbabker said)
now people maybe passing data from 1 layout to the next layout rendered
... by setting variables into the view object
so such a change would really be a B/C break
This might explain why the text on the bottom of the permissions tan is also wrong. @jeckodevelopment reported that a long time ago
That one can be solved I guess in /libraries/joomla/form/fields/rules.php and does not look related to the issue here.
if you var_dump($section)
while in global config permissions, you will get ''
and not null
Therefore we could simply change the code there to
if ($section === 'component' || $section === null || $section = '')
{
$html[] = JText::_('JLIB_RULES_SETTING_NOTES');
}
else
{
$html[] = JText::_('JLIB_RULES_SETTING_NOTES_ITEM');
}
as I don't know if $section can be null
. If it can't, the patch is even more simple.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-14 09:28:16 |
Closed_By | ⇒ | zero-24 |
Labels |
Removed:
?
|
confirmed can be fixed by setting $this->description = ''; (or similiar) here: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_config/view/application/tmpl/default_permissions.php but it does not look like the correct solution.
i guess it is because of this line https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_config/view/application/tmpl/default_filters.php#L14 is called before: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_config/view/application/tmpl/default.php#L106-L120
But I'm not sure if just overrideing the value is correct. I think it should bever be reused?