SOS! Need Help With Code Error in Updating Theme - everything is haulted.

Solved

SOS! Need Help With Code Error in Updating Theme - everything is haulted.

SouthernSpirit
Tourist
7 0 5

I have the envy theme on my site and the version needs to be updated. I followed the instructions to copy/paste the settings.data.json code to new theme so I wouldn't lose any customization or content and it is throwing me this error.  This is not my wheelhouse and my current checkout / cart is wacked out resulting in a huge decrease in conversions/orders. please help - I am not tech savvy.  Thank you so much in advance. 🙂 

 

Error I Get: 

  • Invalid value for type in block '1589906643878'. Type must be defined in schema.

 

Accepted Solution (1)
swym
Trailblazer
170 36 77

This is an accepted solution.

Hey @SouthernSpirit

 

Thanks for confirming that this solution worked😊

 

If my response helped you, please consider giving them a like (👍) and marking them as the accepted solutions if they resolved your issue. Your feedback helps other community members with similar questions.

Thank you!

 

Regards,
Abhishek from Swym 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries

View solution in original post

Replies 5 (5)

swfdev
Shopify Partner
3 0 0

Maybe in the new file, you have a reference to that section id, at the bottom, and that section doesn't exist in your theme.
Just remove the broken reference and that should solve the issue 🙂

SouthernSpirit
Tourist
7 0 5

Thank you! 🙂

swym
Trailblazer
170 36 77

Hey @SouthernSpirit

 

When you copy-paste the schema settings (settings_data.json file) from one theme to another to ensure that you do not lose any customization when upgrading your theme, you need to make sure that all the related files along with the components (section & blocks) that are used in the previous/ original theme are present in the new theme.

 

The error you are facing occurs because your "settings_data.json" file contains a block with a "type" value that is not listed in the block settings for the section it is being added to.

 

Since I don't have access to your store, the steps I am suggesting are the general approach one can take to fix this type of issue. If you implement them in your store, ensure you duplicate the themes and copy the code accurately without losing even a single character. This is a complicated process, and if you are not confident with the Shopify liquid code, please hire a Shopify developer to assist you. 

 

Steps you can take to fix this issue: 

  1. Navigate to Online Store > Themes > Select Edit code on the theme you were upgrading.  
  2. Open the settings_data.json file. 
  3. For steps 4, 5, and 6 refer to the screenshot attached at step 7. 
  4. Search for string: "1589906643878", this is the block ID for the block, throwing the error in your case.  
  5. Check the "type" value of the block. 
  6. Check the section file name, in which the block throwing the error is added. This can be found just above the line where the block object code starts, in the "type" key, as shown in the screenshot labeled "slideshow".
  7. Screenshot for reference for steps 4, 5, and 6. swym_0-1718172112268.png
  8. The simple solution to save the file can be to remove the block of code and that will fix the issue, but with this, you will even lose the customizations for this block.  
  9. To avoid losing customizations, ensure that you add the block, along with its settings and code, from the original theme to the new theme. This can be tricky, as the block code may use snippets, so ensure all relevant files are added to the new theme including any associated styling and scripting, are added to the new theme..  
  10.  Done? now save the file and try previewing the store. 

Hope this helps! 

 

Regards, 

Abhishek from Swym

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries
SouthernSpirit
Tourist
7 0 5

Thank you so much for your help! 

swym
Trailblazer
170 36 77

This is an accepted solution.

Hey @SouthernSpirit

 

Thanks for confirming that this solution worked😊

 

If my response helped you, please consider giving them a like (👍) and marking them as the accepted solutions if they resolved your issue. Your feedback helps other community members with similar questions.

Thank you!

 

Regards,
Abhishek from Swym 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries