Skip to content

[6.x] Preload replicator meta/defaults when blueprint doesn't have a FQH#13951

Merged
jasonvarga merged 1 commit into6.xfrom
replicator-meta-fallback
Feb 17, 2026
Merged

[6.x] Preload replicator meta/defaults when blueprint doesn't have a FQH#13951
jasonvarga merged 1 commit into6.xfrom
replicator-meta-fallback

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Feb 16, 2026

This pull request brings back preloading meta/defaults for Bard and Replicator fields, but only when the blueprint doesn't have a fully-qualified handle.

In #13427, we made it so set meta/defaults are only loaded when you add a new set, reducing the JSON payload sent down to clients. Adding a new set would trigger a network request to get the set and do the necessary processing.

However, the ReplicatorSetController requires a blueprint's fully-qualified handle, which on-the-fly blueprints (like addon settings ones) don't have. This PR ensures we fallback to the old and possibly slower behaviour in those cases.

Closes #13946


if (this.meta.new?.hasOwnProperty(set)) {
let meta = this.meta.new[set];
let defaults = this.meta.defaults[set];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Duncan! Just wondering if this line would introduce similar effects of #13955 ?

Copy link
Member Author

@duncanmcclean duncanmcclean Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually already do a deep clone of the set's defaults here:

const deepCopy = JSON.parse(JSON.stringify(data.defaults));

The addSet() method calls fetchSet(), then once its got the set, it calls _addSet() which has the deep clone logic.

@jasonvarga jasonvarga merged commit af5cd7f into 6.x Feb 17, 2026
13 checks passed
@jasonvarga jasonvarga deleted the replicator-meta-fallback branch February 17, 2026 20:02
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.

Replicator in Addon Settings creates a 422 when trying to add a new Set

3 participants

Comments