Custom Coding Stopped Working

Custom Coding Stopped Working

Guifonte
Tourist
24 0 2

Hi Everyone,  

 

As I expected, after updating my Dawn theme to the latest version, my custom code stopped working. Is there an easier way to identify the issue and restore it?

 

I have an old theme backup, but I prefer to use the latest version.

Thanks in advance.

 

Gui.

Replies 2 (2)

ProdSquad
Shopify Partner
73 3 100

Hello @Guifonte, I hope you are doing great. I have a solution for the same. Please check this out.

 

Identify the Issue

  1. Check for Errors: Use the browser’s developer tools (right-click on the page and select "Inspect") to check for JavaScript errors or CSS issues that might be related to your custom code.

  2. Compare Theme Files: Compare your current theme files with those from the old backup. Look for differences in the code where your customizations were applied. This can help identify where changes might have affected your custom code.

  3. Review Shopify Changelog: Check Shopify’s documentation or theme update notes for changes that might impact your custom code. Look for updates related to the areas where you’ve made customizations.

Restore Custom Code

  1. Reapply Custom Code: Manually reapply your custom code to the new version of the theme. You may need to copy specific code snippets from your old theme files into the new theme files. Pay attention to the context where these snippets are applied.

  2. Use a Theme Diff Tool: Tools like Diffchecker or other diff tools can help you see differences between the old and new theme files.

Testing

  1. Test Changes Locally: If possible, use a staging environment to test changes before applying them to your live store. This can prevent disruptions on your live site.

  2. Preview Changes: Use the Shopify theme editor to preview changes before saving them to the live theme.

 

Try out this solution, this will help you to know the exact issues. Would like to know the result.

Hey @Guifonte give this answer a like if you think this is helpful. Make it as solution, if this helps. 

 

Thanks,

Amit

-Was my reply helpful? Click Like to let me know!
-Was your question answered? Mark it as an Accepted Solution

Dawood_Mirza_
Trailblazer
128 18 28

Hi @Guifonte 
Shopify themes available on our Theme Store can receive automatic updates, but this is only possible if your theme code remains in its original state. This means no apps have been installed that modify the code, and no manual changes have been made, including any adjustments to translations in the language editor.

 

Customizations made using the Theme Editor for Online Store 2.0 themes should carry over to updated versions, with a few exceptions, such as new or updated settings.

 

Given your situation, I recommend performing a manual update, then re-configuring the apps you wish to keep and reapplying any custom code.

I hope this helps, but please feel free to reach out if you have any further questions.

 

Warm regards,

Dawood Mirza.

Want to work with me - dawoodmirzabusiness@gmail.com
Don't forget to like and mark it as Solution if it was helpful to you.