Dynamic blueprint saves data to the YAML file but don't show it afterwards? #9321
Replies: 4 comments 2 replies
-
It would be helpful to see the controller code so we can see how storing the values after submitting the publish form and how you're making Would you be able to put together an example repository for us pull down and take a look at the complete picture? |
Beta Was this translation helpful? Give feedback.
-
Is a private repo suitable, and whom should I add as a collaborator? Or should it be a public one? (I usually use repos on Bitbucket and work in a small team of just two so I'm a bit inexperienced with sharing repos ... sorry.) |
Beta Was this translation helpful? Give feedback.
-
I meanwhile found the problem. It seems that is had to do with some changes in the YAML structure of replicator fields. I published YAML files holding my add-on default settings where keys like "_id" were used in the replicator sets. As soon as I changed the keys to "id" it worked. I do not understand completely how that problem was introduced. Maybe I did at some point something stupid like copying a dysfunctional YAML file into the add-on directory and publishing from there ... |
Beta Was this translation helpful? Give feedback.
-
Thank you! I will check your example in more detail the next days. This is my first add-on and my whole structure is probably overdesigned and way too complicated. |
Beta Was this translation helpful? Give feedback.
-
I'm working on a private add-on which worked fine in Statamic 3.3 but does not in 4.x.
PROBLEM:
I define a blueprint for settings programmatically. It contains a replicator field. I can add a new set and save it. The new set is correctly saved to the YAML file. But when I reload the page no sets are shown at all. All other tabs and fields in the blueprint work as expected.
I use this Blade view to show the blueprint:
The variable $values holds all the necessary data as expected, including all data for the replicator sets. But none show up.
I don't have any more ideas what to look for. I only have the intuitive feeling that it might have something to do with probable changes in
<publish-form>
and/or changes in replicator handling between v3.3 and v4,x? Or something that worked before but now needs some augmentation before being able to be used in the view?But I haven't found anything concrete in the docs.
Maybe I have to change something in the blueprint structure I set up programmatically (see last code snippet)?
Happy for any help! :-)
For reference, here the replicator set as saved to the YAML file, looks fine to me:
Data shows up correctly in $values provided to :
Here the definition in the array I use to define the offending tab with its replicator:
Beta Was this translation helpful? Give feedback.
All reactions