What happened?
Description
I have some entries fields that I want to prefilter to only show entries related to the current entry i.e. Articles related to a topic – I am editing the topic page and have various slots to feature articles. Since these entries fields are within matrix blocks in this context, I can accomplish this with twig by checking for owner and relating to the owner's id. Problem is, this doesn't work until after I save the entry with the new block added.
Steps to reproduce
- Create an entries field inside a matrix block with related to
{{ owner ? owner.id : id }}
- Try to select entries after adding that matrix block, before saving the parent entry.
Expected behavior
I would expect entries related to the owner id to show up in the entries picker
Actual behavior
No entries show up until the parent entry is saved
Craft CMS version
5.6.7
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
I have some entries fields that I want to prefilter to only show entries related to the current entry i.e. Articles related to a topic – I am editing the topic page and have various slots to feature articles. Since these entries fields are within matrix blocks in this context, I can accomplish this with twig by checking for
ownerand relating to the owner's id. Problem is, this doesn't work until after I save the entry with the new block added.Steps to reproduce
{{ owner ? owner.id : id }}Expected behavior
I would expect entries related to the owner id to show up in the entries picker
Actual behavior
No entries show up until the parent entry is saved
Craft CMS version
5.6.7
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions