-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Theme input settings do not allow types "metaobject" or "metaobject_list" #4414
Comments
Thanks @etienne-ditchlabs -- I have tried this as well, but could not get it to do what I needed, given the limitations of Liquid. Here is a similar scenario to the FAQs, but with different data.
|
This isn't a bug but more of a feature suggestion to Shopify - they aren't supported as input settings within the theme editor which is why you will get the error you will. If you view this, you can see in the sidebar what is supported: |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
I should be able to add the input setting type of "metaobject" or "metaobject_list" and the Theme / Schema validator in
theme dev
would validate it and allow the theme to properly render the input settings in the Theme editor.Actual behavior
When I add the input setting in my section liquid file using type "metaobject" or "metaobject_list",
theme dev
cannot validate my input setting type and prints:Verbose output
Reproduction steps
I have been getting into the metaobject definitions and creating themes for these, so I can template pages and easily populate them in a set of inputs rather than coding up new files each time. Great! I was excited as it fit a need.
Created my metaobjects and then a template for them. Each template and liquid section would then bind it's input values to the values in the metaobject entry.
I have created a
sales_landing_page
metaobject with 2 dozen fields in it. I also have afaqs
metaobject with 2 fields in it (question and answer). Each landing page does not need the same FAQs, but the most relevant ones.This means I needed a 1:many cardinal relationship in my 2 "database tables", wanting many FAQs on one Landing Page entry.
So I created a new field on
sales_landing_page
as a metaobject reference, referencing thefaqs
metaobject.Where I get blocked is creating a theme input setting allowing me to bind an input setting to the
faq
metaobject reference field on mysales_landing_page
.Except I was not sure what input setting
type
to use. The Shopify docs do not show any reference tometaobject
ormetaobject_list
input setting types. HOWEVER, VScode intellisense shows me these two types, so went forward with it.At first I just put
metaobject_list
but then the schema validator told me thatmetaobject_type
was required. But I could not find ANY documentation on this either.Intellisense provides me this link to refer to the
metaobject_list
input setting type, but this page makes no reference.https://shopify.dev/docs/themes/architecture/settings/input-settings#metaobject_list
shopify theme dev
on an existing working theme and load your local env pages that you will work on"type": "metaobject"
or"type": "metaobject_list"
... Here is mine:theme dev
terminal where it will show:Invalid schema: setting with id="faq_metaobject_list" type is invalid
Operating System
Mac OS Sonoma 14.6.1
Shopify CLI version (check your project's
package.json
if you're not sure)Shopify CLI; v=3.66.1
Shell
zsh
Node version (run
node -v
if you're not sure)No response
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: