We help IT Professionals succeed at work.
Troubleshooting Question

Word Press Problems

Richard Korts
on
76 Views
Last Modified: 2020-08-13
This is a followup to https://www.experts-exchange.com/questions/29191321/Word-Press-Site-Dead.html#questionAdd 

The host installed the new Bee theme; the Child Theme disappeared, so a lot of work for the last 3 years is gone. I think I can get the site the way it was this morning restored (from Host backup). Can I use wp-admin to upgrade to the new Bee without destroying the Child theme? My memory was that was the purpose of Child Themes in the first place.

Thank you
Comment
Watch Question

Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
When you update the theme, it should not update the child theme. However, some themes have child themes with their own code already set.  Just get the theme up to date, then you should be able to write over your current child theme folder with the one you are restoring.

I am going through something similar myself but with Avada.  I am just backing up the WP folders to the server by copy/paste because it makes it easier to restore.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
The problem I see us the whole issue started because of that jquery thing, in the original post. That js file has to be in the Child Theme, if the child theme is not efffected by the upgrade, that will be of no value.

Right now the host has managed to delete the Child Theme, the site shows (partially), content circa 2015. The customer will of course no longer by my customer if I can't fix this. Hope I don't get sued.

What a nightmare. I think I counted on the expertise of the host people too much.

Richard
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Your site is pointing to https://www.rain1.com/  but this morning it was pointing to https://www.rain1.com/new-site/ which now shows content that it did not earlier.

One fix may be to point the domain to /new-site.  I think you are going to be ok though.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
Scott, that is a temporary change. I suggested I put a placeholder page so that my customer's customers do see a blank page.

The host doesn't get it, I can tell from their messages.

What you see at new-site is the content circa 2015 using the base theme, bty, the theme is Bee.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
On  https://www.rain1.com/new-site/  it is showing the site. You do see the short code [layerslider id="6"]  and that may need to be updated in order to show the slider.

Also, hit f12 while on /new-site and there is still a js error in cusstom.theme.js  That is the same error as eariler

If you click on the link for the js file, you are taken to

This is pointing to something about ie version 9. At this point, nobody has ie 9.  I would just take that out.


Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Ok, then that is a database issue.

Are you doing nightly backups? of the database?  You may just need to restore yesterday's database and that will take care of the content.


KimputerIT Manager
CERTIFIED EXPERT

Commented:
The jQuery and MSIE issue is probably only a partial problem. I'm sure there will be more to fix later.

Please note, MYSQL and Site backup is kind of your own responsibility. Even if there was no CPanel like tool ready at the hoster for you, you could still get the backup done yourself (FTP, combined with PHPMyAdmin).
Always have both, in multiple copies over time, ready on your own local machine, and preferably also a few copies in the cloud/external hard disk.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
Yes, I am almost sure. The site including database is backed up I think nightly. I have just told the host NOT to override that backup, no matter what.

So I am thinking of restoring from last night, find that js file & update that line. Are you saying eliminate the if and have it read jQuery('#navi>div>ul>li').css etc.?

Thank you,

Richard
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
For now, I would just concentrate on switching out the database. You can come back to that JS error. It is just because "browser" is deprecated.  Hopefully that switch will do the trick.

If the site goes 'white' again after you update the database, Then work on on settings in the admin area because if you view the source, you can see the rendered html.  It was the css that was causing the site to look white.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
I am having them restore from last night; it was white then, but at least I can back up the database & the rest of the content to my own machine. Then at LEAST I have something, the host screwed it up big time, but I was stupid to trust them, so it's on me.

I still don't see why fixing that error referring to msie < 9 won't help. At least it will get past that point. Or will it?
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
The host keeps claiming they have restored to last night. I had a couple for browser windows open to wp-admin. Could that cause the restore to fail? Sounds like wishfull thinking but they keep saying they restored it, stuff installed today (accidentally) is still there & Media Library is empty. That seems impossible unless the site was badly hacked in the last few days.

Thanks

Richard
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Or maybe there was not a real back up and they restored from something that was backed up a long time ago and there has not been any new back ups?

I think I would like to find out how many back ups they have and get a copy of each to load up locally.  

As a very last resort, can you rebuild from http://web.archive.org/web/20190306072713/https://www.rain1.com/new-site/ 
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
I raised hell about 3 hours ago, they have assigned a different tech, he sounds like he knows more, he said, oh you want a full restore?

Like, duh. He said they had at least 4 backups, I asked him to use Aug. 2. Only one minor change I can easily reproduce since then.

We shall see. I’ m basically done for today.
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
1) The host installed the new Bee theme; the Child Theme disappeared, so a lot of work for the last 3 years is gone.

Restore your child theme from a backup.

Another trick you can do is to make a zip file of your child theme... locally... using an unzipped full backup... then just install the child theme zip file.

Tip: Any custom theme, child theme, plugin... be sure to keep zip files around in case they must be restored.

2) I think I can get the site the way it was this morning restored (from Host backup).

Might be time to take a backup file + move the entire site to new hosting... as your current hosting company... seems to be causing unacceptable problems...

3) Can I use wp-admin to upgrade to the new Bee without destroying the Child theme?

Let's see... A better way of saying this is... updating a Parent Theme will never modify any files in your Child Theme directory.

Whether your Child Theme will function after a Parent Theme update is another matter.

You'll just have to test your upgrade to determine if your Child Theme functionality remains correct.

4) My memory was that was the purpose of Child Themes in the first place.

The purpose of Child Themes is to extend/modify a Parent Theme's function.

Generally, if you use a Parent Theme built specifically for Child Themes like GeneratePress, then so far after years of GeneratePress updates, every Child Theme I work with has continued functioning.

To answer this question about the Bee Theme would require reading their docs + scanning their code.

Guideline: "Simpler a Parent Theme, more likely Child Theme functionality will survive Parent Theme updates".
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
I was having some issues with a theme after upgrading WP to 5.5 and it apparently was due to being on PHP 7.3.  After upgrading to PHP 7.4 I was good.  That may not directly have anything to do with what you are experiencing, but good reminder to update to the latest version of php if you have upgraded WP to the latest version.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
The site was, finally, properly restored to Aug 2. All white screens. Same error if I turn on Chrome debugger.

Scott, I am still not sure how to remove the line referencing msie: This code:

if( (jQuery.browser.msie == true && parseInt(jQuery.browser.version) < 9) ) {}else{
         jQuery('#navi>div>ul>li').css('margin-left','0')
      }
I think I just remove all except jQuery('#navi>div>ul>li').css('margin-left','0'), is that correct?

I've forgotten where all this is located, is custom.theme.js code in WordPress? Where is that.

Also, someone yesterday suggested jQuery version 1.12 is too old ( I think Kimputer). Is the link to the jQuery version at ONE place in the whole theme or several Where are those?

Thank you
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Just to start, remove the id's wrap and main as noted below and the site will be shown.  Then look in your custom js or css that is targeting #wrap and #main to see what is causing that.




Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
Scott, how did you get that screen image BELOW the code? That is exactly what the main page is supposed to look like?
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
If that css is added by betheme, then I would put in a support ticket and ask why because maybe those id's are being used wrong?  

You may also add to the child theme css to make the opacity 1.  That will do the same and when betheme gets updated again, that bit will not be overwritten.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
I deleted the previous post because the line numbers do not match up.


Richard KortsBusiness Owner / Chief Developer

Author

Commented:
Scott,

I deleted this:

#header_wrap, #footer_wrap, #main, #sidebar {     opacity: 0; }

It now works (almost). I say almost because in Firefox, it looks perfect. In Chrome, it cannot finish loading the main page. There are videos at the bottom of the main page. They seemingly "never" load. I cleared cache, all that. The other pages look good.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
On your custom.theme.js is where it is supposed to animate to opacity 1

If there are js errors on the site, that may be blocking.  I am not a fan of fading in like that anyway. I say remove that bit of code and also where I showed previously on line 494, 495 and 496 about msie



Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
The site loads fine for me in chrome and firefox.  Are you on a mac? I seem to remember my mac had to be restarted a lot in addition to clearing cache for something like this.

On that custom.theme.js, remove what I suggested.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
The opacity is already 1 there.

Richard
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
OK, I'll ask the customer to look. No, I am on Windows 10. But I'll restart computer.
It's so tantalizing, it's ALMOST there.

Thanks for all this.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Right, but that bit of code is no longer needed, I think.

But the js error from the part starting on line 494 - 496 needs to go.  If somebody has ie9, they are running into problems all over anyway.
Richard KortsBusiness Owner / Chief Developer

Author

Commented:
Scott, for now I will let sleeping dogs lie on the js error.

I am very skittish about even what I have done on the opacity? How did that get set that way ANYWAY?

The huge screwup I did yesterday is gone, the host restored to Aug. 2, all that betheme crap is gone. So the site worked on Aug 2 with opacity 0 and not today. This stuff is not magic, there has to be a cause.

If the customer is OK, I'll go with what we have now.

Richard
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
What was happening I think is the reset on the style.css set the opacity to 0. Then the js set it to 1 with animation. But because of the error caused by the now depreciated "browser" in jquery, js stopped working and the opacity was never set.

Get all of this on your local computer or another part of your server to test out. I bet if you get rid of that error, you can put the opacity back to 0 if you wanted. Personally, think it is better to just appear.


Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.