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.x]: Twig template relation condition rules bug in a matrix field #13269

Open
mathieuser opened this issue Jun 2, 2023 · 1 comment
Open
Assignees

Comments

@mathieuser
Copy link

What happened?

Description

When I set-up a Matrix field with one block with functionality as per #12679 , it works as expected: one relation-field filters the second. When I use this set-up on a second block, the page needs to be saved and refreshed before filters apply.

Steps to reproduce

  1. Make a matrix field with one block with 2 relation fields of entry types that are related to eachother.
  2. Test the matrix field and see the filter working
  3. Add another block with the same functionality
  4. See that the filter is only applied after saving / refreshing

Expected behavior

When I have two relation-fields, I want to select the first one, which then acts as a filter for the second one. When the first one is selected, the second one must be filtered on opening.

Actual behavior

This works flawlessly when I have this set-up on only one of the matrix blocks I created. When I add this functionality to a second block, the filter stops working on both blocks, until I save the project and the page reloads, then the second field is filtered again.

Schermopname.2023-06-02.om.10.01.25.mp4

Craft CMS version

4.4.13

PHP version

8.1

Operating system and version

No response

Database type and version

Mysql

Image driver and version

No response

Installed plugins and versions

@i-just i-just self-assigned this Jun 2, 2023
@i-just
Copy link
Contributor

i-just commented Jun 5, 2023

Hi, thanks for reporting. We’re aware of this and plan to action this in Craft 4.5.
For now, reloading the element edit page after adding a block will do the trick.

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