No Code Attached Yet
avatar Kostelano
Kostelano
10 May 2022

Steps to reproduce the issue

Install Joomla RC1, note that in all components (for example, in the media manager) the descriptions for the parameters in the component settings have disappeared.

The problem is with this change. Remove the change on this line and the descriptions will revert to parameters.

As far as I can tell, this breaks the PR #37699, so I'm not sure how to properly fix this to keep PR #37699 working.

avatar Kostelano Kostelano - open - 10 May 2022
avatar joomla-cms-bot joomla-cms-bot - change - 10 May 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 May 2022
avatar Kostelano
Kostelano - comment - 10 May 2022

While I was looking for a problem, 4.1.3 came out. The problem is the same there.

avatar richard67
richard67 - comment - 10 May 2022

Can the descriptions be enabled by using the Toggle Inline Help button?

avatar Kostelano
Kostelano - comment - 10 May 2022

No. Because such a button is only in the general settings and somewhere else (I don’t remember the component).

avatar ReLater
ReLater - comment - 10 May 2022

Confirmed!
Where no button, descriptions hidden.
Where button, possibility to show them.

I don’t remember the component

com_content, articles

avatar ChristineWk
ChristineWk - comment - 10 May 2022
avatar ReLater
ReLater - comment - 10 May 2022

37158

Yep. Another first merge then think ;-)

avatar Kostelano
Kostelano - comment - 12 May 2022

@cyrezdev, could you help us?

Other components will be updated if it's ok with this PR the way i did it. ;-)

In any case, this should be fixed by one of us as soon as possible, as this is a "button car with no icons/tooltips" for both new Joomla users and non-advanced administrators.

avatar cyrezdev
cyrezdev - comment - 12 May 2022

Hello,
Maybe time to check this this weekend, but may not be related to my PR to first include the toggle button in com_content.

EDIT: in 4.1.2, no such issue, and my PR was already merged in it!
The issue is due to a change in 4.1.3

avatar sandewt
sandewt - comment - 15 May 2022

Same issue ?
Missing decriptions at the plugins, e.g. plugin Recaptcha (tabindex and callback):

description

avatar Kostelano
Kostelano - comment - 15 May 2022

@sandewt Throughout the admin panel, except for the articles component and general settings (there is a button for switching hints).

But this is complete nonsense compared to the fact that in some localization string there is no dot at the end of the sentence.

avatar sandewt
sandewt - comment - 15 May 2022

there is a button for switching hints

@Kostelano I'm missing this button at the plugins or am i seeing it wrong ?

avatar Kostelano
Kostelano - comment - 15 May 2022

@sandewt Yes, it is not in plugins and in all other components, except for the general settings and the materials component (added in https://github.com/joomla/joomla-cms/pull/37158/files#diff-250b59d27f418e931b052803c0a6089439df3f1ada6db18096ec9f9e5edb095c).

Screenshot_1

We need to either cancel this change, or make changes to all components in the same way as PR #37158.

avatar cyrezdev
cyrezdev - comment - 15 May 2022

We need to either cancel this change, or make changes to all components in the same way as PR #37158.

Cancel.
As even with addition of the toggle button in all core components, it will still be an issue for third-party extensions.
I didn't had the time yet to check, but the way would be to revert the change, and find a new way to improve integration.

avatar sandewt
sandewt - comment - 15 May 2022

The situation as it is now [J4.1.3] is unacceptable, because as with the plugins, the help texts disappear.

avatar Kubik-Rubik
Kubik-Rubik - comment - 16 May 2022

It is currently impossible to enable the descriptions for plugins and modules in Joomla! 4.1.3 without workarounds. This should be fixed asap! The inline help toggle button should be automatically displayed in the Modules (com_modules) and Plugins Manager (com_plugins).

In the meantime, 3rd Party developers can enable the descriptions by using a custom field type with a CSS instruction: https://docs.joomla.org/Creating_a_custom_form_field_type/en

Create the custom field type file (see documentation) and add the following code to the file:

protected function getLabel(): string
{
     Factory::getApplication()->getDocument()->addStyleDeclaration('div.hide-aware-inline-help.d-none {display: inline-block !important;}');

    return '';
}

But I agree with @cyrezdev, this is a backward compatibility break. Every extension must be rewritten to add the inline help toggle button. This is not acceptable for a bugfix release!

avatar cyrezdev
cyrezdev - comment - 16 May 2022

@Kubik-Rubik do you know how to get the inlinehelp xml element value from the renderField layout ?
As maybe adding this check in the field layout could fix the issue by adding the class d-none only if inlinehelp button exists.
And no B/C this way.

avatar Kubik-Rubik
Kubik-Rubik - comment - 16 May 2022

If it is defined in the XML file like:

<inlinehelp button="show"/>

Then you can retrieve it in your custom field like:

$this->form->getXml()->config->inlinehelp['button'];

But this will not help us here; the inline toggle button must be added to the toolbar outside the parameters form.

avatar cyrezdev
cyrezdev - comment - 16 May 2022

I don't mean to add it in layout, but to get its value ;-)

And from the Joomla Layout rendefield (core field).
https://github.com/joomla/joomla-cms/pull/37699/files
This change from #37699 is meant to prevent "flash" while loading options page when inlinehelp toggle button is integrated.
But it is this PR which breaks descriptions display.

My wondering is how to properly get inlinehelp element if set in layouts/joomla/form/renderfield.php
So that d-none class could be added only if inlinehelp button integrated.
(and this would fix B/C issue)

I see form xml is in $displayData['field'] but i don't know how to get its elements values... in a clean way.
($this->form->getXml()->config->inlinehelp['button'] does not work in a layout context)

avatar Kubik-Rubik
Kubik-Rubik - comment - 17 May 2022

@cyrezdev Yes, it would be possible. This is just a quick example of how to check for the Inline Help Toggle Button in the renderfield.php:

// after line 12
use Joomla\CMS\Toolbar\{Toolbar, Button\InlinehelpButton};

...

// after line 27
$inlinehelpButtonLoaded = false;
$toolbarItems = Toolbar::getInstance()->getItems();

foreach ($toolbarItems as $toolbarItem) {
    if ($toolbarItem instanceof InlinehelpButton) {
        $inlinehelpButtonLoaded = true;
        break;
    }
}

...

// after line 40
if (!$inlinehelpButtonLoaded) {
    $descClass = 'hide-aware-inline-help';
}

But this is not the proper approach since the file is loaded multiple times during one request. It would be better to set it as an option in \Joomla\CMS\Form\FormField::renderField.

avatar brianteeman
brianteeman - comment - 17 May 2022

Even better would be to fix the actual bugs that I created

avatar cyrezdev
cyrezdev - comment - 17 May 2022

@Kubik-Rubik This is exactly what i thought, and why i was wondering if a "clean" way to get the option...
But you put me on a possible way, so i will open a PR! ;-)
Thanks!

avatar cyrezdev
cyrezdev - comment - 17 May 2022

I've created a PR #37819 to fix display of description.

@brianteeman @Kubik-Rubik @richard67 @Kostelano @ReLater @ChristineWk

avatar richard67 richard67 - change - 17 May 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-05-17 12:25:47
Closed_By richard67
avatar richard67 richard67 - close - 17 May 2022
avatar richard67
richard67 - comment - 17 May 2022

Closing as having a pull request. Please test #37819 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment