Adding blocks to a MasterPage ( pages/product.liquid) seems to crash the editor.

Solved

Adding blocks to a MasterPage ( pages/product.liquid) seems to crash the editor.

leighb4rnes
Shopify Partner
18 2 7

Hi all been digging deep this week into the new sections theme & app ( and the api ) 
AWESOME WORK! I am sure its one hell of an undertaking that side.

However I did notice something when I add any blocks into the masterpage schema, it seems to thow a full screen error "There's a problem loading this page" with a console error `Cannot read property 'type' of undefined`

Do blocks on master pages need a different syntax, that I missed in the docs?

It's no big deal, just thought I would flag it. 

Accepted Solution (1)
Liam
Community Manager
3108 341 879

This is an accepted solution.

Glad to help Leigh! 

 

If you do come across any more issues, starting a topic here is best for visibility 👍🏼

 

Cheers,

 

Liam

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 7 (7)

Liam
Community Manager
3108 341 879

Hi there @leighb4rnes ,

 

I've tested out adding blocks to the product page section myself and I'm pulling up some errors too, so I'm going to flag this with our developers. I'll let you know when we have a fix! Otherwise, glad to hear you've been testing out the new theme architecture. 🙂 

 

Cheers,

 

Liam Griffin

Shopify | Partner Education 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Liam
Community Manager
3108 341 879

Hi again Leigh,

Our internal dev team has implemented a fix for blocks on page sections, so you should be able to add them as expected to your developer preview store now. 

If you're still seeing issues, feel free to DM me on here and we can troubleshoot further! 

Cheers,

Liam

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

leighb4rnes
Shopify Partner
18 2 7

Awesome stuff! thanks @Liam 

If I find anything else would you like stuff raised on this subforum? or is there a better place to raise them?

Thanks again!

Liam
Community Manager
3108 341 879

This is an accepted solution.

Glad to help Leigh! 

 

If you do come across any more issues, starting a topic here is best for visibility 👍🏼

 

Cheers,

 

Liam

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

SkoorySquirrel
Pathfinder
129 1 45

@Liam wrote:

Hi again Leigh,

 

Our internal dev team has implemented a fix for blocks on page sections, so you should be able to add them as expected to your developer preview store now.

 


Hi Liam,

 

Can we add 'blocks' to product pages of Venture?  

Thanks.

 

Add brick blasting, block busting, tile breaking 2D action adventure game Squirrels are going NUTS to your wishlist on Steam or make a donation to TTLCIC.org.uk
leighb4rnes
Shopify Partner
18 2 7
@SkoorySquirrel I added them to a full custom theme, so adding the folders, master page and some schema compatible sections should get you there, wasn't limited to debut for me.
SkoorySquirrel
Pathfinder
129 1 45

@leighb4rnes wrote:
@SkoorySquirrelI added them to a full custom theme, so adding the folders, master page and some schema compatible sections should get you there, wasn't limited to debut for me.

For developers, not for merchants :)!  Downloaded the latest version of Venture and it doesn't seem to support blocks for product pages as far as I can see! Just applied some CSS code (thanks to @OTM's 10.17.2019 post about this) to change the way product images are displayed. Venture is an interesting theme, but not the product pages! The code seems to work well for desktops, but mobile view is limiting number of product images displayed to 4: main image and 3 thumb images. If a product has 7 images, mobile viewers can't see half of them! There must be a solution, but I don't have it yet! Any ideas? Thanks :)!

Add brick blasting, block busting, tile breaking 2D action adventure game Squirrels are going NUTS to your wishlist on Steam or make a donation to TTLCIC.org.uk