Jump to content


Photo
* * * * * 1 votes

WPEngine Copy Fail, 502 Bad Gateway error

wpengine 502 copy

  • Please log in to reply
12 replies to this topic

#1 JimP

JimP

    Member

  • Members

  • 12 posts
  • LocationVictoria BC Canada
  • Framework Version:2.0+
  • Country: Country Flag

Posted 16 June 2014 - 11:03 PM

Hi there, 

I have been dealing with the people at

Please Login or Register to see this Hidden Content

where I host my pagelines DMS site. Currently, the "copy site" function, doesn't work on WPengine, it seems because of a dms theme issue. 

 

I'm running the latest pagelines version, 2.1 here's the WPengine's engineer's comments, as below;

 

I checked out the bigtclub install that was cloned out. After some digging I saw that the .htaccess wasn't showing correctly, so I updated it. In the test it was still giving the 502 error.

Next I checked the plugin and theme. I deactivated the plugins and reverted the theme to twentyfourteen. After clearing the cache and testing the site the wp-admin page finally loaded up for me. I turned the plugins back on and site was still up. Then when I turned the theme back on the 502 came back.

So it looks like something in the dms theme is causing the 502 error. I would suggest contacting the theme developer and see what they can find. Here is a section of the error log that you can show the developer and maybe it will point them where to check.

 

Here's the error message;

Please Login or Register to see this Hidden Content

 

In the mean time i've left the theme as twentyfourteen so you can access it now.

I'll leave the ticket open just incase you have any further questions but if you feel this is resolved on our end let us know.

 

thanks for any help with this, as I can not easily copy my site currently. - Jim


Edited by james.pearson, 16 June 2014 - 11:10 PM.


#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 16 June 2014 - 11:22 PM

So do you use the propricing section? Or is it just an empty folder?

 

Its pretty obvious what PHP is telling you in that error: Failed opening '/nas/wp/www/cluster-2262/tsresales/wp-content/themes/dms/sections/propricing/section.php'

So that file does not exist, but PHP is expecting it, so why on earth were they doing updating a htaccess file?

 

Check your folders, see if that file exists.



#3 JimP

JimP

    Member

  • Members

  • 12 posts
  • LocationVictoria BC Canada
  • Framework Version:2.0+
  • Country: Country Flag

Posted 17 June 2014 - 05:15 PM

Hi Simon - I do use the pro pricing section and it seems to work fine. I'm not sure why it is failing to see the file, or if the file exists in the right place, but will look around in the folders to see what I can find. Thanks for your reply; it may seem obvious, but i'm new to creating sites - thx again.



#4 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 June 2014 - 05:44 PM

Well a 502 gateway error is nothing to do with any PHP script/theme/app whatever, thats the HTTP server not being able to connect to the PHP server. So them blaming DMS for a 502 is a bit strange.



#5 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 17 July 2014 - 07:50 PM

I've been experiencing issues with cloning installations that use DMS hosted by WP Engine. And I think I've narrowed down the issue. 

 

It appears that after the site is cloned, there are entries in the database that provide the path to the sections that are being used on the site. When you clone a site, this database entry is not updated, and DMS continues to attempt to load sections using the path of the old installation.

 

The database entry in question is in the options table, named: theme_mods_theme-name

 

I can delete the contents of that entry, and the site will load. Is there an easier way to do this? I haven't checked if it destroyed content or settings yet.



#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 July 2014 - 07:57 PM

I wouldnt delete that entry, a lot of data is stored there.

 

Clicking the reload sections button would clear it.



#7 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 18 July 2014 - 12:41 AM

Unfortunately I can't get to the button because I get a 502 bad gateway error until I clear the database entry. Is there another way to trigger it? Any idea what function that button is linked to? Maybe a query string could be added to trigger whatever that button does. Otherwise I don't really see a way to fix this on a site you can't get into.



#8 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 18 July 2014 - 12:52 AM

If you have access to the dms developer plugin there is a purge URL you can use.

 

To remote purge all caches and update the js/css cache number use this url:

Please Login or Register to see this Hidden Content

 

Otherwise you need to clear the theme option with something like this:

 

set_theme_mod( 'editor-sections-data', array() );

 

But only run it once, dont leave that running on every page load ;)

 



#9 JimP

JimP

    Member

  • Members

  • 12 posts
  • LocationVictoria BC Canada
  • Framework Version:2.0+
  • Country: Country Flag

Posted 18 July 2014 - 05:54 PM

Hi RSMM and Simon - I went into myPHP admin and simply renamed the "current_theme" from "DMS" and replaced that with another theme - "twentyfourteen". Once this was completed, I could then login to my site on WPengine. Before that, it was a 502 error. 

 

I deactivated DMS 2.1 as the site was missing some formatting and objects were not loading as they should. After re-activating, the site appears to be copied fairly well. Hope that helps.

 

Simon, I am a non technical webadmin, and really enjoy using DMS 2.0. I can't see how you can blame a copying error on WPengine, when it appears that it is related to the DMS theme. Other themes copy without any issue. But of course, I'm not really qualified to analyze the issue. thanks all for the help in general.



#10 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 20 July 2014 - 08:47 AM

Good news, armed with this knowledge I was able to create solution with a few lines of code. I added this to the top of my child theme's functions.php file. It checked to see if the path stored in the database points to an actual file. Since it's the Canvas area included with the DMS parent theme, it's a safe bet that this path should point to a real file. If it doesn't it's safe to assume that this data is stale and needs to be refreshed. This will clear that area of the theme mod. 

Please Login or Register to see this Hidden Content

I hope this helps others. This would have saved me about a week of frustration and sadness.

 


Edited by rsmm, 20 July 2014 - 08:47 AM.


#11 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 21 July 2014 - 05:46 AM

Whoops, I forgot to paste a line. Editing now.

 

**update**

apparently I can't update my old post. So I guess I'll create a new one with the correct code.


Edited by rsmm, 21 July 2014 - 05:51 AM.


#12 rsmm

rsmm

    Member

  • Members

  • 25 posts
  • LocationWashington
  • Framework Version:2.0.2
  • Country: Country Flag

Posted 21 July 2014 - 05:50 AM

Please Login or Register to see this Hidden Content



#13 Danny

Danny

    Is Awesome!

  • Moderators
  • 16555 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 21 July 2014 - 12:04 PM

Thanks for sharing.







Also tagged with one or more of these keywords: wpengine, 502, copy