[5.0.0-alpha]: Conditionals don't work when applying in a matrix block
Open
Nobody has claimed this yet.
bug
craft4
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
When conditionals are added to entry types used in a Matrix block, toggling a lightswitch for example doesn't get applied straight away.
Steps to reproduce
- Add a conditional (lightswitch) to an entry type to hide/show a field
- Add that entry type to the Matrix
- When going into the entry and toggling the lightswitch, the value gets saved but no action happens on the field with the assigned conditional.
- Click on entries to get out of the Editor
- Click on the entry again to go into the Editor
- The conditional has been applied.
Expected behavior
When switching around a lightswitch it should reflect the conditional straight away.
Craft CMS version
5.0.0-alpha
PHP version
8.2
Operating system and version
No response
Database type and version
MySQL 8
Image driver and version
No response
Installed plugins and versions
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are mentioned. Reproduce the issue in the Craft CMS Matrix editor using a lightswitch conditional, then trace the conditional update handling when the entry type is nested in a Matrix block. Done means the dependent field responds immediately when the lightswitch changes, without leaving and reopening the entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100