A space to discuss online store customization, theme development, and Liquid templating.
I'm using an App embed block and noticed that if one of my setting IDs happens to be the same as a theme setting ID, my embed block setting will overwrite the theme setting. This seems problematic to me as relying on namespacing IDs in embed blocks seems pretty fragile.
This can be seen in the settings_data.json config. Let's say that the setting ID for both is 'custom_script'. After saving, the value for the embed block setting will be output in both the block object but also directly in the "current" node. Example:
{
"current": {
"custom_script": "Custom app JS",
...
"blocks": {
"blockid": {
"type": "blockurl",
"disabled": false,
"settings": {
"custom_script": "Custom app JS"
}
}
}
}
}
Again, this is only an issue if the theme also happens to have a setting with the same ID.
If this intended functionality, then the documentation should be much more clear about it!
Solved! Go to the solution
This is an accepted solution.
Hi Dan,
This should be fixed now. Please reach out if you're still seeing this behaviour!
To learn more visit the Shopify Help Center or the Community Blog.
Does anybody know if this is a bug that will get fixed? Or is this just how it works?
I can't find anything conclusive in the documentation and I'd like to know for sure before I change my app embed block setting IDs. Doing so will break functionality for our existing users.
I've reached out to the Partners Slack community and directly to Partner support with no reply so far.
Thanks, all!
This is an accepted solution.
Hi Dan,
This should be fixed now. Please reach out if you're still seeing this behaviour!
To learn more visit the Shopify Help Center or the Community Blog.