-
AuthorPosts
-
May 9, 2021 at 12:49 pm #1299165
Can you please help to check there is an issue with the PHP code of the theme?
the whole website is broken.
May 10, 2021 at 4:29 am #1299204Hey vivienne2020,
There were two js errors on your site:
Uncaught SyntaxError: Unexpected token '<' (index):905 Uncaught SyntaxError: Invalid or unexpected token
I replaced this code:
function inline_popup_enabler(){ ?> <script> (function($){ $(window).load(function() { $(‘.inline_popup’).magnificPopup({ type:’inline’, midClick: true }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'inline_popup_enabler');
with:
function inline_popup_enabler(){ ?> <script> (function($){ $(window).load(function() { $('.inline_popup').magnificPopup({ type:'inline', midClick: true }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'inline_popup_enabler');
then this code is also replaced:
function add_gtm() { ?> <script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','XXX-XXXXXXX');</script> <!-- End Google Tag Manager --> </script> <?php } add_action('wp_head', 'add_gtm');
with:
function add_gtm() { ?> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','XXX-XXXXXXX');</script> <!-- End Google Tag Manager --> <?php } add_action('wp_head', 'add_gtm');
then in Enfold > Performance, I unchecked Load jQuery in your footer
Please review your site, if there are still issues, please let us know (and maybe give us some screenshots)Best regards,
NikkoMay 11, 2021 at 2:50 am #1299505Thanks for the help
The website is broken 10th May as I opened it.
What I did was that I rolled back the backup of the 6th of May, and the website back to normal before I submitted the support. I am just afraid it will happen again.
In addition, our web host PHP will be upgraded from 7.3 to 7.4 if I need to change anything with the theme? thanks
May 11, 2021 at 5:43 am #1299545Hi vivienne2020,
I see, I think the best way or the safest route is to first create a staging site (basically a duplicate of your live site).
You can follow the instructions on this article in order to set it up: https://themeisle.com/blog/wordpress-staging-site/
Then you can perform the updates on the stage site and see if the issue still occurs.
You may need to disable CSS file merging and compression and Javascript file merging and compression in Enfold > Performance in order to make sure newer CSS and JS files are served.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.