?
avatar brianteeman
brianteeman
4 Mar 2021

While testing #32585 I couldnt understand why my editor didnt display a fields button. It turns out the reason was that if there are no fields the button is never displayed. While I understand the logic behind that it is inconsistent with other xtd-editor plugins such as contacts or modules which do not check to see if records exist before rendering the button.

Looking at the code it appears to be something a bit more complex and that the intention was not to display the observed behavior but is a side effect of a check to ensure the fields for the correct component are displayed.

// Validate context.
$context = implode('.', FieldsHelper::extract($context));
if (!FieldsHelper::getFields($context))
{
return;
}

avatar brianteeman brianteeman - open - 4 Mar 2021
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Mar 2021
avatar brianteeman brianteeman - change - 23 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-23 08:24:13
Closed_By brianteeman
avatar brianteeman brianteeman - close - 23 Apr 2021
avatar brianteeman
brianteeman - comment - 23 Apr 2021

Closed as there is a PR

Add a Comment

Login with GitHub to post a comment