Skip to content

Limit by Category setting on relationship field not working #5148

@anthony8bc

Description

@anthony8bc

Description of the problem
"Limit by Category" setting on relationship fields does not appear to be working as expected.

How To Reproduce
Steps to reproduce the behavior:

  1. Create a relationship field, select a channel and then, under "Limit by Category", select a category to limit the selection of related entries.
  2. In the related channel, set the categories on the entries as required.
  3. In the parent channel, "No entries found" is displayed in the relationship, although entries exist and are assigned to the category specified in the "Limit by Category" step, above
  4. Back in the relationship field settings, reset the "Limit by category" to "Any Categories" and the entries are available for selection.

Error Messages
No error messages

Screenshots / Videos / Template Code

Image

Entries in the related channel have the category selected.

Image

NB: The relationship field is called "Images", below is what is displayed if limited to a category

Image

Environment Details:

  • Version: 7.5.19
  • PHP Version 8.4.15
  • MySQL Version 8.2
  • OS: Windows
  • Web Server: Apache

Additional context
Examining the database, the serialized field settings for the relationship field appear to limit the categories to category id 0. On another occasion categories ids that did not exist were specified in the serialized settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions