Skip to content

[5.x]: Relations missing from propagated global sets and assets, after adding a new site #16752

@mmikkel

Description

@mmikkel

What happened?

Description

After adding a new site, relational fields in propagated global sets and assets are empty.

Resaving the global sets/assets manually via craft resave fixes the issue, i.e. the relations are propagated successfully after the resave.

I'm unable to reproduce the behavior when enabling a new site for an existing section, so the issue seems isolated to global sets and assets.

Steps to reproduce

  1. Create a global set, and add an Entries field to it
  2. Add an entry to the Entries field. Save the global set
  3. Add a new site, and wait for the "Propagating global sets" queue job to complete
  4. Visit the global set's edit page, and confirm that the Entries field still has the entry selected for the original site, but is now empty for the new site.

Expected behavior

Existing relations in non-translatable relational fields should carry over to propagated global sets and assets when adding a new site.

Actual behavior

Existing relations fail to carry over to propagated global sets and assets when a new site is added, and a manual craft resave is required to have the relations propagate.

Craft CMS version

5.6.9.1

PHP version

8.2.27

Operating system and version

DDEV v1.24.2

Database type and version

MySQL 8.0.40

Image driver and version

No response

Installed plugins and versions

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions