Skip to content

Fluid field groups do not render child field validation errors in the Control Panel #5387

Description

@akwadnet

Description of the problem

In ExpressionEngine 7.5.26, validation of a child field inside a Fluid field group correctly prevents the entry from saving, but the specific inline validation message is not rendered in the Control Panel.

For example, a URL field inside a Fluid field group was given the relative value /ar/esg/. The URL field correctly rejects the value, and the Fluid field returns a validation failure. However, the editor is not shown the message beside the invalid URL field, so the failed save appears to be a generic Fluid issue.

How To Reproduce

  1. Create or use a Channel with a Fluid field that contains a field group.
  2. Add a url field to that field group.
  3. Edit an entry and enter a relative URL such as /ar/esg/ in the grouped URL field.
  4. Save the entry.
  5. Observe that the save is rejected but no inline error is displayed beside the invalid child field.

Expected behavior

The entry should not save, and the URL validation message should be rendered next to the grouped URL field.

Actual behavior

The entry does not save, but the child field error markup is silently discarded. This makes the validation failure difficult for editors to identify.

Cause and possible solution

system/ee/ExpressionEngine/Addons/fluid_field/views/fieldgroup.php calls renderError() without outputting its return value:

<?php isset($errors) ? $errors->renderError($field_name) : '' ?>

Changing it to an output expression renders the expected message:

<?= isset($errors) ? $errors->renderError($field_name) : '' ?>

The equivalent standalone Fluid view, fluid_field/views/field.php, already uses <?= ... ?>.

Environment Details

  • ExpressionEngine version: 7.5.26
  • MySQL: 8.0.44
  • OS: macOS
  • Local web stack: MAMP

Additional context

The one-character local change above was verified: after the fix, the existing invalid URL produced the precise inline validation message in the field group.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions