Replies: 3 comments 3 replies
-
|
This is currently working as expected so I converted your issue to a discussion. I agree it could make sense to give nested entries the option to have Post/Expiry Date fields, especially since Matrix fields have an Entry URI Format setting – so nested entries could have their own URLs. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the discussion! I agree that having Post/Expiry Date fields for nested entries inside Matrix fields would make sense, especially since they can have their own URLs via the Entry URI Format. From a practical standpoint, the current restriction feels limiting for editors who want to control visibility or schedule content at the nested-entry level. Adding toggles like “Show Post Date Field” and “Show Expiry Date Field” on the entry type or possibly on the Matrix/section settings would give developers full control without breaking current behavior. Regarding Singles, I also see the trade-offs. Defaults could be disabled for Singles, but having the option available would still be useful in edge cases, like temporary or campaign-driven content. Overall, it seems reasonable to allow Post/Expiry Date fields for all entry types but keep the display configurable via toggles, respecting the current flexibility in Craft. |
Beta Was this translation helpful? Give feedback.
-
|
In the meantime, I proposed an event so devs can decide how they want to handle it for each entry. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Description
Multiple customers have asked us why the post and expiry dates cannot be set for entries inside matrix fields.
After looking at the code I found that this has been disabled.
Is there a reason why this is the case? Can this be changed?
Steps to reproduce
Expected behavior
The fields should be visible.
In Craft CMS, all entries have a status, a start date, and an end date, therefore, the editor should have the option to set them.
Move this block of code out of the condition:
Code
If enabled, everything works as expected, my entry gets hidden in the frontend after expiration.

Actual behavior
The fields are not visible because of this condition:
code
if ($section && $section->type !== Section::TYPE_SINGLE) {}Craft CMS version
5.7.4
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Beta Was this translation helpful? Give feedback.
All reactions