Welcome to the Liquify Community

Updated 2 weeks ago

Pages/sections not detected

Hey I've jus built and converted a theme for the first time with Liquify and once imported into Shopify very few pages and sections are detected/displayed. I'm also hit with the error "Role can't be set to main: missing required file layout/theme.liquid", when trying to set the Github connection as the published theme, but when uploading manually that error doesn't happen (but very few sections/pages are displayed).

As far as I'm aware I've done everything by the books, but clearly I'm missing something. Could anyone take a look if I'm missing something obvoious here?

Webflow read-only: https://preview.webflow.com/preview/makebo1?utm_medium=preview_link&utm_source=designer&utm_content=makebo1&preview=2e903db79948c9938579805d4b825151&workflow=preview
Github: https://github.com/JonathanFors/Makebo-2
m
J
j
20 comments
Hi @Jonathan Fors can you paste me the webflow zip file please? ๐Ÿ™‚
One thing I have seen: In the hero section you have a paragraph that has the attribute: li-settings:textarea but this one doesnt exist on textelements, only on textarea element, it should be li-settings:text and for richtext its li-settings:richtext ๐Ÿ™‚
Ah that Text attribute will be a global issue then throughout the theme, Iโ€™ll adjust and see what changes. Could you give an example of how the li-settings:textarea would be used then? From the Liquify documentation it says itโ€™s supposed to create a bigger input field in the Shopify editor, maybe Iโ€™m misunderstanding.
Iโ€™ll share the Webflow zip later today!
hmm, I think I am wrong with the textarea field. I have not used it yet. Wolud be interesting to see thezip file, so I can convert it and see what it converts too. I only ever use :text or :richtext ๐Ÿ™‚
Probably its a text field that lets turns the input in shopify into a textarea field so its little bit easier to input longer content
For the moment I would keep the textarea field, and I can test it out with the zipfile
Hi @Jonathan Fors, i found a view issues which are caused by the same mistake. You cant use a filter on a for loop like this: li-for="collection in product.collections | first".
To filter array you first need to assign them: https://shopify.dev/docs/api/liquid/filters/array-filters

for example:
li-tag="assign assignedCollection in product.collections | first" (put a div before the li-for attribute. No children inside)
li-for="collection in assignedCollection"
Thanks a bunch for the help here both of you, appreciate it. I'll try these tomorrow and get back to you.

As for the Webflow zip, here it is (too large to upload directly in Discord): https://drive.google.com/file/d/1dbsN7JQ9Evk2ObGYTBZF7shhLLekA5ZL/view?usp=sharing
Also, very interesting and useful with the array filters @jonas.halbstark , I somehow didn't see this in the documentation while I was working on it. Thanks
So to clarify โ€“ @jonas.halbstark you said "(put a div before the li-for attribute. No children inside)", do you mean that the li-tag and li-for attributes don't go on the same div? Or li-tag goes on the parent div of li-for?

Sorry if it's a redudant question, still very new to this.
Just an update: Adjusted the textarea settings attribute just in case that was the issue as @marv said, but no change. Also applied the changes @jonas.halbstark suggested.

Converted the theme again and currently no pages or sections are displayed when previewing in Shopify, but the sectionName.liquid files do exist when clicking "Edit code" from shopify.
li-for and li-tag not on the same div ๐Ÿ™‚ li-tag should be on a seperate div before the li-for tag.
textarea should not cause any issues.
Got it! Thanks for explaining. Lets hope thatโ€™s what is causing the conversion issue, ill try
Hey @jonas.halbstark again ๐Ÿ˜„ โ€“ I applied what described with the assign, but I am now getting this error

[ ] Error: sections/category_list_2.liquid,ย Validation failed: Liquid syntax error (line 1): Syntax Error in 'assign' - Valid syntax: assign [var] = [source]

See Webflow read-only: https://preview.webflow.com/preview/makebo1?utm_medium=preview_link&utm_source=designer&utm_content=makebo1&preview=2e903db79948c9938579805d4b825151&locale=en&workflow=preview

At first I followed the structure you wrote li-tag="assign assignedCollection in product.collections | first but after the error I also tried li-tag="assign assignedCollection = product.collections | first as that's the suggested structure from the error. But no change, still the same error occurs.

Could you help me out here? ๐Ÿ™‚
Turns out this issue was related to another issue I raised here, which is solved now.
Hi @Jonathan Fors so this is solved? ๐Ÿ™‚ sorry for the delay. i was on holidays.
Hey! Happy new years ๐ŸŽ† Yes this is solved, it was all related to various syntax errors in the way I was adding attributes ๐Ÿ™‚
Happy New Year to you too! ๐ŸŽ‰ Glad to hear itโ€™s all sorted outโ€”syntax errors can be sneaky! ๐Ÿ˜„ Thanks for the update! ๐Ÿš€
Add a reply
Sign up and join the conversation on Discord