Javascript Conflicts

Hello,

Recently we had a problem in a widget on our website vikasayoga.com.
Some page have a booking engine widget like this one: https://vikasayoga.com/the-place/

The calendar popup was not working for a while till I found what was causing the problem.
So, If I go to Appearance-> Editor-> functions.php, I need to remove the last line for the booking widget to work
//add_action(‘get_header’, ‘wp_html_compression_start’);

I think after an update to the theme I will have the same problem again.

Can you give me any suggestion or tell me with this line of code is messing up with the booking Engine Widget?

Thanks in advanced,
Alex

This is an automated message to notify you that your thread was posted in the wrong forum, and it has been moved to the correct place. A member of our team will be happy to reply just as soon as your thread is up.

For support, all questions are to be posted in the Themeco category or by clicking + Support. The other categories are for discussion with fellow Apex members. Please keep this in mind in the future. Thank-you!

How support works.

Hey Alex,

Thanks for writing in! I have search for this line //add_action('get_header', 'wp_html_compression_start'); in a 4.6.4 version and the latest version. I could not locate it. Did you happen to add it in your functions.php file? Or it is coming from the plugin? Would you mind providing us the url of your site with login credentials so we can take a closer look?

To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

Thank you.

Hello RueNel,

Thank you for your reply.

I didn’t add this line on the end of functions.php.
Maybe was created with some plugin ?!

I created a secure note so you can take a look.

Thanks in advanced.

Hi,

You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes!

Hi Paul,

Thanks for the reply.

I did that already and still have the problem, :frowning:

Hi There,

This line: //add_action('get_header', 'wp_html_compression_start'); is commented out, so it does not really matter whether you remove this or not.

That is not an X theme function so this means your parent theme functions.php file was edited and what not.

I’ve advice that you reinstall the X theme, this is also a good time to update your X theme to the latest version (5.1.0), since you already have updated your Wordpress (4.8), and install a child theme so you can do your modifications in there without worrying that your customization will be overwritten by a theme update.

You can follow the Manual X Update Via FTP guide provided here, to make sure that you have a clean copy of X.

Remember to clear all caches after updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

This is more likely an issue with your booking engine widget, so better to contact the plugin author as well.

Thanks,

Thank you very much for your reply friech,

I already contact the booking engine widget and they said nothing was changed from their side.
Anyway, the booking engine is now working, so all good

Was just wondering that this line //add_action(‘get_header’, ‘wp_html_compression_start’); came from!

I would love to update X Theme to the latest version. We have PHP V. 7.0.18 from our host.

The update process looks very straightforward but I’m just afraid what after the update something will not work and I can’t figure it out how to solve it.
And I’m not sure how child themes work to test it first somehow.

Thanks in advanced.

Hello There,

Thanks for updating in! I’ve look around and it seems that the line is coming or for a minification plugin. Please check out this links:


I would recommend that you create a staging site. And in your staging site, you can install a child theme. The staging site is very useful because you can test drive any X updates in the staging area, do the customizations and troubleshooting without disrupting your live site. Once everything is perfect, you can easily and flawlessly proceed the update in the live site. To know how to create a staging area, please check out these articles:


Hope this helps.

Thanks for the reply RueNel,

Thanks for the clarification on the functions.php last line.
Yeah, we had some minification plugins but now most of them are deactivated.
Anyway, as long as that line in comment out we have no problems with the booking engine widget.

About the update I tried to follow the tutorial from here:


But I got stuck in the middle of it.
Trying to replace some values after copy the database to the new staging site but after type this:
(UPDATE wp_options SET option_value = REPLACE(option_value, ‘https://vikasayoga.com’, ‘http://staging.vikasayoga.com’):wink:
on the SQL tab on the staging database I got this error:
#1146 - Table ‘vikasa5_staging.wp_options’ doesn’t exist

I’m sure I’m doing something wrong but don’t know what :frowning:

Ok, I found the problem.
I replaced this:
UPDATE wp_options SET option_value = REPLACE(option_value, ‘https://vikasayoga.com’, ‘http://staging.vikasayoga.com
for this:
UPDATE wp_vgks_options SET option_value = REPLACE(option_value, ‘https://vikasayoga.com’, ‘http://staging.vikasayoga.com

I will continue with the tutorial :slight_smile:

Hello again,

After create the staging site following the instructions from here:

I realise that I don’t have any media file.
I copied the folders: uploads, themes and plugins to the new site. I have the plugins and the themes, but not the media.
Also I just have a sample page, not all the pages I have on the original site.
So it looks like this: http://staging.vikasayoga.com/staging
And I can’t validate the X-theme license. It does not accept the license I have for X-Theme.

Any suggestions?

Thanks.

Hello There,

In order to validate your staging area, you must revoke the license or assign the license to your staging url as the staging site. Please do the following:
1] Please go to X > Overview and revoke the validation (https://s3.amazonaws.com/community-themeco/app/uploads/2016/04/17110514/Capture53.jpg).
2] Please login to your account and revoke the license.
3] After you have revoke the license, you need to re assign the license again to your site using this url: https://www.example.com/. You have to make sure that url you just assign is the same as the one you have in your settings, Settings > General > Site Address
4] Go back to X > Overview again, and insert your license code.

Hope this helps.

Perfect RueNel,

Now I have both: vikasayoga.com and staging.vikasayoga.com/staging validated.

No I’m wondering. It’s not suppose the staging website be a mirror or Vikasayoga.com?
Why I don’t have the pages, posts and media on staging that I have on the life website?

Thanks in advanced,

Hi there,

I am not sure why this is happening, I see that you used a 3rd party tutorial to do so. I suggest that you start over by the official documentation of the Wordpress:

https://codex.wordpress.org/Moving_WordPress

Sites built with X are no different than any other Wordpress website and you simply can use the official documentation to clone the website to a staging server.

By the way good idea to have a staging website, then you can use that to update the theme and all stuff there and make sure things are working again.

One other point regarding the minification of assets, the new version of X does that itself automatically and it is not recommended to use such plugins at all as it will have a conflict with the one which theme uses.

Thank you.

That’s amazing Christopher.

Thank you for the clarification.

I will check this tutorial.

Perfect :slight_smile: Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.