Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] xtd-editor fields plugin #32586

Closed
brianteeman opened this issue Mar 4, 2021 · 1 comment
Closed

[4.0] xtd-editor fields plugin #32586

brianteeman opened this issue Mar 4, 2021 · 1 comment

Comments

@brianteeman
Copy link
Contributor

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;
}

@brianteeman
Copy link
Contributor Author

Closed as there is a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants