WordPress.org

Ready to get started?Download WordPress

Forums

sudden fault in theme.php - site gone (26 posts)

  1. dianabyron
    Member
    Posted 3 years ago #

    Went into my site to activate Contact-Form-7 plugin and the whole site was gone! Dashboard has a message which I cannot understand (I don't write html) that says:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/diannet/public_html/wp-includes/theme.php on line 513

    Can anyone tell me what this means? Why would my theme (F2) suddenly go belly-up when I have done nothing to it (wouldn't dare)? How can I get my site back up asap? (I de-activated and deleted the Contact-Form-7 just in case, but site does not come back).
    thanks

  2. Tara
    Member
    Posted 3 years ago #

    Have you tried:
    -deactivating ALL plugins temporarily to narrow down and possibly fix the problem . If the problem goes away, activate them individually to find the culprit?

    If you don't have access to your admin area, try deactivating them manually via FTP or phpMyAdmin.

    -switching to the default theme (Twenty Ten) for a moment by renaming your current theme's folder in wp-content/themes to rule out any theme-specific issue?

    If you don't have access to your admin area, then access your server via FTP or SFTP or whatever file management application your host provides.

    - resetting the plugins folder by FTP or phpMyAdmin? Sometimes, an apparently inactive plugin can still cause problems.

  3. dianabyron
    Member
    Posted 3 years ago #

    I did deactivate all plugins but the site is still gone.
    In cpanel I deleted the plug in folder, refreshed and the site is still gone.
    When I went into WP dashboard to Manage Themes, there are 5 error messages:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/diannet/public_html/wp-includes/theme.php on line 513

    Warning: uksort() [function.uksort]: The argument should be an array in /home/diannet/public_html/wp-admin/themes.php on line 73

    Warning: array_slice() expects parameter 1 to be array, boolean given in /home/diannet/public_html/wp-admin/themes.php on line 94

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/diannet/public_html/wp-admin/themes.php on line 150

    Warning: natcasesort() [function.natcasesort]: The argument should be an array in /home/diannet/public_html/wp-admin/themes.php on line 151

    I will try the Twenty Ten option if I can figure out how to do it.
    I don't know how to reset the plugins folder so can't do that just yet.

  4. dianabyron
    Member
    Posted 3 years ago #

    Just went to do that and discovered to my surprise that the whole wp-content/themes folder has disappeared!! This magical disappearance of files is getting very alarming. I don't know why it's happening or what to do about it.

  5. dianabyron
    Member
    Posted 3 years ago #

    Went to Install Themes so I can reload themes folder to my site (since that magical disappearance) chose F2 again (my preferred theme) and I get:

    Warning: Invalid argument supplied for foreach() in /home/diannet/public_html/wp-admin/includes/theme-install.php on line 492

    I get the same for Twenty Ten.... so it's not the themes themselves....

    Now what to do?

  6. dianabyron
    Member
    Posted 3 years ago #

    OK here's more information. I compared the cpanel versions of wp-includes/theme.php and wp-admin/includes//theme-install.php with their original files in the original WordPress folder which I keep on my HD for emergencies. The versions are identical on the lines quoted in the error messages. So I cannot see why I get those error messages and no website.

    Now going to re-upload the iexplicably missing wp-admin/themes.php and see what happens.

    I did, and still no website. HELP!!!!

  7. Tara
    Member
    Posted 3 years ago #

    -If the above steps do not resolve the issue, Download WordPress again and replace your copies of everything except the wp-config.php file and the /wp-content/ directory with fresh copies. This should replace your core files without changing your content and settings in wp-config.php file and the /wp-content/ directory.

    Note that some uploaders may not overwrite files reliably, so delete the original files before replacing them.

  8. dianabyron
    Member
    Posted 3 years ago #

    Thanks t-p, will give that a go.

  9. dianabyron
    Member
    Posted 3 years ago #

    t-p, well I did all that - deleted all but wp-config.php and wp-content, and reloaded fresh copies of everything else. Nothing. No website. I guess my only option now is to restore from a cpanel backup and see if that works. It's rotten having website down and not knowing why. Any of you wordpress moderators out there with an answer? Would be appreciated...

  10. dianabyron
    Member
    Posted 3 years ago #

    Still getting error message on my dashboard:
    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/diannet/public_html/wp-includes/theme.php on line 513

  11. dianabyron
    Member
    Posted 3 years ago #

    Just did the restore from full backup. Nothing - pages just white. Serious.

  12. Simon Prosser
    Theme Review Admin
    Posted 3 years ago #

    looks to me like you have renamed or deleted your whole themes folder! You were supposed to rename the active theme folder like mytheme to mytheme_bak to force WordPress to fall back to twentyten.

  13. dianabyron
    Member
    Posted 3 years ago #

    The weird part is I had never touched my theme folder. All the trouble began when I installed a Contact Form plugin - Mike Cherim and Mike Rolley's WordPress-Ready Contact Form. I deleted it and tried Contact-Form-7 but by then things had started disappearing at random and nothing could fix my site even after deleting the plugins. My web host just restored the theme folder and the site's up but they put in Twenty Ten instead of my F2 and all my widgets and my custom header have been lost and will have to be re-done.

    Does anyone know of a Contact Form plug-in that DOES NOT crash the website?

  14. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    All the trouble began when I installed a Contact Form plugin - Mike Cherim and Mike Rolley's WordPress-Ready Contact Form.

    I know that plugin very well. Although I would not recommend it for a WP3x site, it would not cause the kinds of issues you describe. Something else caused the loss of your folders.

    In the meantime, try Contact Form 7: http://wordpress.org/extend/plugins/contact-form-7/

  15. dianabyron
    Member
    Posted 3 years ago #

    I did find another person on the forum who lost their whole site after installing a Contact Form plugin. Their comment was: "So strange that one line of code on a plugin could take a whole site down though."
    So I'm a bit scared to try one unless you are sure it doesn't do damage....

  16. dianabyron
    Member
    Posted 3 years ago #

    Just downloaded Contact Form 7, installed and activated, and copy-pasted the code into my Contact page on Html View. Result is no good - just a string of text lines but no form. What should I do now?

    See:
    http://cells2universes.com/?page_id=81&preview=true&preview_id=81&preview_nonce=3b10d77f3c

  17. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    What code did you enter into your page content?

  18. dianabyron
    Member
    Posted 3 years ago #

    The code from Contact-Form-7:
    <p>Your Name (required)
    [text* your-name] </p>

    <p>Your Email (required)
    [email* your-email] </p>

    <p>Subject
    [text your-subject] </p>

    <p>Your Message
    [textarea your-message] </p>

    <p>[submit "Send"]</p>

  19. mkirkwag
    Member
    Posted 3 years ago #

    dianne -have you run everything through a virus checker? esmi will tell you - I'm highly amateur, but it sure sounds like malicious code to me.

  20. dianabyron
    Member
    Posted 3 years ago #

    Just had another look. It said to "copy this code..." etc, etc, but it did not say to copy the title in! So I put that in too and the form is now displaying properly.

  21. dianabyron
    Member
    Posted 3 years ago #

    I have a new question now - will post new topic about comment spam

  22. dianabyron
    Member
    Posted 3 years ago #

    Thanks Esmi and everyone for your atttention and help. PS mkirkwag, I'm on an intel Mac and viruses are not a problem (yet)

  23. sonyynos
    Member
    Posted 3 years ago #

    Hi diannetrussell, your problem is really the same problem with my problem, I'm also still confused how to solve it, I have reinstalled my wordpress, but when I put a favicon it all back in trouble, I'm still confused and still not get a solution, if I reinstall it again in the future I'm afraid if I want to add some more code would be in trouble again .. I've been looking here and there, but still can not, is there someone who can help?
    please....

  24. dianabyron
    Member
    Posted 3 years ago #

    Sonyynos,
    I understand how you feel! Here's what did not work for me: restoring website from an earlier backup; downloading new copy of WordPress and replacing all but wp-config.php file and the /wp-content/ directory.
    This is what DID work: I emailed my web host what had happened. They re-installed my theme folder (which got my website back up but with the wrong theme). I got the complete theme folder (F2) from my emergency copy of WordPress that I keep on my hard drive, and ftp'd it up to my cpanel into my public_html folder. Then my site was looking completely back to normal. Then I installed Contact-Form-7 from WordPress and activated it, and it plus everything is working properly. At first I put in all the code that was given with Contact-Form-7 but that was not right - I discovered that I only need to put in what looks like the title and the contact form works fine.

  25. sonyynos
    Member
    Posted 3 years ago #

    Diannetrussell,

    my problem is resolved, that I do is I delete the wordpress from my server then I instal ( reinstal ) the wordpress and setup again, I use the other template. I can access both of wp-admin and my site well.

    For Contact us page I use Quick contact, to editing some code/script I don't use wordpress theme editor, but I edit the script/code directly from my hosting server. Then I backup the database in my hosting server. so far so good, I hope it run well for next time.

    Thanks all

  26. mkirkwag
    Member
    Posted 3 years ago #

    diannetrussell - me, too...but don't be *too* confident...I got one, and I'm careful! I've started running a virus checker.

Topic Closed

This topic has been closed to new replies.

About this Topic