Skip to content

Conversation

@i-just
Copy link
Contributor

@i-just i-just commented Oct 29, 2025

Description

When publishing an unsaved draft that is no longer fresh, ensure all required attributes and custom fields that would otherwise be considered invalid are propagated across all relevant sites (as they do when a draft is considered fresh).

For example:

  1. you have at least 2 sites (site1 and site2);
  2. a section, enabled for both sites with propagation method set to all and entry type with required title and plain text fields, plus an optional number and email fields - all set to be translatable per site;
  3. you create an entry in site1, only fill out the number field;
  4. you go back to the entry index page and edit the draft again;
  5. you fill out the title, plain text and email fields and fully save that entry so that it’s published

Before this change, your changes from step 5 would not be propagated to site2, leading to a live entry without a title, with a temporary slug and with an empty required plain text field.

With this change, all required fields that would otherwise be invalid are filled with the content from site1.

Added:

  • craft\base\ElementTrait::$propagateRequired property
  • craft\base\Field::handlePropagateRequired() method

Made craft\elements\NestedElementManager::duplicateNestedElements() method public.

There’s also a supplementary PR for this in the CKEditor plugin repo: craftcms/ckeditor#479

Related issues

#17955

@i-just i-just marked this pull request as draft October 29, 2025 11:19
@i-just i-just marked this pull request as ready for review October 30, 2025 11:27
@i-just i-just requested a review from brandonkelly October 30, 2025 11:38
@brandonkelly brandonkelly merged commit 2d98972 into 5.9 Nov 7, 2025
4 checks passed
@brandonkelly brandonkelly deleted the bugfix/17955-propagate-required branch November 7, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants