WordPress.org

Support

Support » How-To and Troubleshooting » sudden fault in theme.php – site gone

sudden fault in theme.php – site gone

  • dianabyron
    Member

    @diannetrussell

    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

Viewing 15 replies - 1 through 15 (of 25 total)
  • Tara
    Participant

    @t-p

    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.

    dianabyron
    Member

    @diannetrussell

    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.

    dianabyron
    Member

    @diannetrussell

    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.

    dianabyron
    Member

    @diannetrussell

    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?

    dianabyron
    Member

    @diannetrussell

    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!!!!

    Tara
    Participant

    @t-p

    -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.

    dianabyron
    Member

    @diannetrussell

    Thanks t-p, will give that a go.

    dianabyron
    Member

    @diannetrussell

    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…

    dianabyron
    Member

    @diannetrussell

    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

    dianabyron
    Member

    @diannetrussell

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

    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.

    dianabyron
    Member

    @diannetrussell

    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?

    esmi
    Forum Moderator

    @esmi

    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/

    dianabyron
    Member

    @diannetrussell

    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….

    dianabyron
    Member

    @diannetrussell

    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

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘sudden fault in theme.php – site gone’ is closed to new replies.