Visual Composer not working after server move

Hello, I have recently used All-in-One wordpress migration to move an install of x-theme to a new site. Once this move was made, Visual composers stopped working. I have used this method 100’s of time with no issues.

A few trouble shooting steps I have gone through so far after reading other items in the forum:

  1. Disable and delete VC and re-install through x-theme plugin installer
  2. Attempt to use a default WP theme.
  3. Check that there were no issues with the old url and new url via PHP My Admin. (find replace, search etc)
  4. Re-activate my x-theme licence and move licence to new URL through theme-co licencing
  5. Double check permalinks and .htaccess are not messed up
  6. Manually install VC through another licence I have.

There is one thing I have found out. When I click “Edit page with Visual Composer” from the front end I get a 502 Bad gateway error.

My back end just doesn’t even show WB-Bakery page builder at all when editing a page. The plug looks fine and shortcode is Working on the front end of the production environment.

Hi there,

Thanks for writing in! Could you please try checking your debug.log file on your server which records your errors. Usually it will under your wp-content directory or the root of your WordPress installation.

If not, try installing a plugin like this (https://wordpress.org/plugins/error-log-monitor/) and see if you can find any error logs.

Thanks!

Errors:

[04-Feb-2018 12:41:22 UTC] PHP Warning:  mkdir(): Permission denied in phar:///chroot/wp-cli/vendor/wp-cli/wp-cli/bin/wp-cli.phar/php/WP_CLI/FileCache.php on line 265

[04-Feb-2018 20:20:53 UTC] PHP Notice:  Undefined index: profile_link in /home/SERVER/public_html/WEBSITEROOTDIRECTORY/wp-content/themes/x-child/functions.php on line 22

This is the function we put into the child theme to enable custom login path.

//Admin URL
				if ( $lwa_data['profile_link'] == '1' ) {
					if( function_exists('bp_loggedin_user_link') ){
						?>
						<a href="/profile/"><?php esc_html_e('Profile','login-with-ajax') ?></a><br/>
						<?php
					}else{
						?>
						<a href="/profile/"><?php esc_html_e('Profile','login-with-ajax') ?></a><br/>
						<?php
					}
				}

The line if ( $lwa_data[‘profile_link’] == ‘1’ ) { is line 22.

Okay, I am having a really hard time understanding this. I use Massive Addons for Visual Composer. So I did the thing you are supposed to do and disable all plugins. This ins’t normally a step I would take if I have a fully functioning production website that has been live for over a year.

I took this step and enabled them all one by one until the WP-Bakery back-end stopped working. Massive Addons is causing this but it was not an issue ever before.

As far as I am still concerned the issue is with x-theme / WB Bakery as this production website worked fine until a URL change.

I have disabled and re-installed theme / re-installed Massive Addons / WB Bakery, nothing is working here.

Hi,

Can you provide us wordpress and ftp login of the old site.

We need to check and compare to see where the fault is.

Thanks

I have updated the Secure note. The old URL I have made live as domain forwarding has been turned off for this. The www/ on FTP you will see both sites. I have done a fresh port of the archived server site to the new site in order to make sure that databses / plugins / pages are exactly the same.

Hi there,

First of all, you cha easily check if the problem is caused by the theme or not by changing the theme to default WordPress theme, something other than X. If the problem persists then it is not related to the theme and you need to check the new environment and see why this is happening.

I double checked the case and it indeed throws the 502 Gateway error. That is 100% a server related error and not related to our theme. You need to contact your server administrator to get more help.

I did a Google Search regarding this that can help you with your troubleshooting.

Thank you.

Okay thank you for this. I ended up moving the site with another hoster / and on seperate hosting account with same host and it was a hosting issue. Thank you for your time Apex. I plan on integrating x-theme into my client builds forever and this was the first time I ever had an issue.

Please close this out.

Hi,

Glad to know that this issue has been resolved.

Have a nice day! :slight_smile:

I wanted to let anyone else here experiencing this error to know what the specific solution was re:hosting issue.
There was an issue with how long the URL was that was breaking funcitonality here.

Adding a line to the HTacecss file solved this issue, but WP Bakery can’t cope with too long URL’s apparently.

SubstituteMaxLineLength 30m

Once this was added, WB-bakery started working again. I don’t even want to go down the rabit hole of why this was the case. But it was.

Hey @seanbydesign,

Glad your host sorted it out. And, thanks for sharing the solution.

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