Deeplinking of app blocks sometimes adds a wrong app block to the page

Hello,

We have noticed a glitch that sometimes when we are using deeplinking of app block previews it adds a wrong app block to the page, for example:

We have an app block for the product page and an app block for the collection page, the behavior when it works correctly is:

For the product page app block:

  1. we open our deeplinking url:

admin.shopify.com/store//themes/<theme_id>/editor?template=product&addAppBlockId=<app_block_id>/<block_name_for_product_app_block>&target=mainSection

  1. Shopify’s theme editor redirects to their link with more parameters and adds the app block to the page:

admin.shopify.com/store//themes/<theme_id>/editor?previewPath=%2Fproducts%2Fshirt&block=template–23332165648725__main__<app_block_of_product_page>&section=template–23332165648725__main

And for the collection page:

  1. we open our deeplinking url:

admin.shopify.com/store//themes/<theme_id>/editor?template=collection&addAppBlockId=<app_block_id>/<block_name_of_collection_app_block>&target=mainSection

  1. Shopify’s theme editor redirects to their link with more parameters and adds the app block to the page:

admin.shopify.com/store//themes/<theme_id>/editor?previewPath=%2Fcollections%2Fcategory&block=template–23332165648725__main__<app_block_for_collection_page>&section=template–23332165648725__main

But sometimes when we open the same link for product page app block, Shopify then keeps us on the right preview page which is the product page but instead of adding the product related app block it adds the collection one:

  1. we open our deeplinking url, same one that we use for the product page app block

  2. Shopify’s theme editor redirects to their link with more parameters and adds the app block to the page:

admin.shopify.com/store//themes/<theme_id>/editor?previewPath=%2Fproducts%2Fshirt&block=template–23332165648725__main__<app_block_for_collection_page>&section=template–23332165648725__main , here the previewPath is the right one, for products, but the app block is for the collection.

We assume it might be related to cache or frequent opening of theme editor pages in the browser, maybe having a few of them running together.

Is there anything to fix this behaviour?

Thanks in advance,
Vasya

1 Like