WordPress.org

Forums

Functions.php error (24 posts)

  1. zacho56
    Member
    Posted 3 years ago #

    Hey guys. I recently had this error when trying to switch back to my theme. Fatal error: Cannot redeclare _verify_activate_widget() (previously declared in /home/zbeworl0/public_html/Newsblog/wp-content/themes/arras/functions.php:188) in /home/zbeworl0/public_html/Newsblog/wp-content/themes/arras/library/admin/templates/functions.php on line 243

    I need this fixed ASAP and have no idea where to start. Can someone lend a hand?

    Thanks!

    Zach

  2. vtxyzzy
    Member
    Posted 3 years ago #

    Did you modify the theme, specifically the admin/templates/functions.php file? If that is what caused the error, you could use ftp or a file manager from your hosting service to upload a fresh copy of wp-content/themes/arras/library/admin/templates/functions.php.

  3. zacho56
    Member
    Posted 3 years ago #

    Hey thanks for the reply. Nope never modified anything! I even deleted and reinstalled the theme but to no avail. any more ideas?

  4. vtxyzzy
    Member
    Posted 3 years ago #

    What version of arras are you using. I downloaded v 1.5.1.2 and cannot find _verify_activate_widget in any file.

  5. zacho56
    Member
    Posted 3 years ago #

    1.5.2 RC2

  6. zacho56
    Member
    Posted 3 years ago #

    I found the line it's talking about in the functions.php file but didn't know what to do with it

  7. vtxyzzy
    Member
    Posted 3 years ago #

    If you look at this link:

    http://code.google.com/p/arras-theme/downloads/list

    you will see that 1.5.2 RC2 is listed as unstable. Use a stable version.

  8. zacho56
    Member
    Posted 3 years ago #

    I also tried the version you are talking about but I got another error. shall i try again and post it?

  9. zacho56
    Member
    Posted 3 years ago #

    AFter trying the version 1.5.1.2 im getting Fatal error: Cannot redeclare _verify_activate_widget() (previously declared in /home/zbeworl0/public_html/Newsblog/wp-content/themes/arras 2/functions.php:75) in /home/zbeworl0/public_html/Newsblog/wp-content/themes/arras 2/library/admin/templates/functions.php on line 279

    I hope we can fix this as no other theme seems to be satisfactory :(

  10. vtxyzzy
    Member
    Posted 3 years ago #

    I am beginning to suspect that your site has been hacked. The functions.php file that I just downloaded ends at line 256 with these lines:

    /* End of file functions.php */
    /* Location: ./library/admin/templates/functions.php */
  11. zacho56
    Member
    Posted 3 years ago #

    Is there any way i can send you something to look at? Im totally desperate here my friend. Im willing to do anything to fix this!

  12. vtxyzzy
    Member
    Posted 3 years ago #

    Download a copy of the same version of the theme to your local machine and compare the two files.

    If you have been hacked, it could be a long, difficult process to clean up.

    You can do a free scan of your site at the link below. It does not catch all malware, but does a pretty good job.

    http://sitecheck.sucuri.net/scanner/

    If that reports errors, see the Codex article FAQ My Site Was Hacked for tips on cleanup.

  13. Kizzie86
    Member
    Posted 3 years ago #

    just reading this thread sorry to hear Zacho

    but @vtxyzzy can I ask what can you do to prevent hacking and spamming etc I'm totally new to WP is there anyplace I can read up on protecting my site?

    Thanks in advance!

  14. zacho56
    Member
    Posted 3 years ago #

    I just did the scan and nothing. its all green. Hmm. Im stumped and very frustrated at this point :'(

  15. vtxyzzy
    Member
    Posted 3 years ago #

    @Kizzie86, start here:
    http://codex.wordpress.org/Hardening_WordPress

    then do a Google search on 'hardening wordpress'

    And, please, next time start your own thread rather than inserting a new question into an existing thread.

    @zacho56, did you download the theme to your local machine and compare the two functions.php? What did you find?

  16. vtxyzzy
    Member
    Posted 3 years ago #

    If your site is clean, the extra code probably came from a plugin. Try deactivating all plugins to see if the error goes away.

    If it does, reactivate one half at a time to find the one causing the problem.

  17. zacho56
    Member
    Posted 3 years ago #

    ill try the plugins but if i deactivate all of them and reactivate them will their settings still be intact?

  18. zacho56
    Member
    Posted 3 years ago #

    i tried the plugns. nope its not them. this is insane. I looked at the functions.php's and on the installed theme it was way shorter than the downloaded theme's functions.php file. any ideas?

  19. vtxyzzy
    Member
    Posted 3 years ago #

    After thinking about it over night, I believe that just deactivating the plugins will not find the problem because the bad code is already installed. You would need to disable all plugins then reinstall the theme while they are disabled.

    If you don't have too many plugins, list them here and I may be able to spot ones that might cause trouble.

  20. zacho56
    Member
    Posted 3 years ago #

    Hey bud. First, words cant begin to describe how much I appreciate you taking time to help me with this.

    Now..

    I deactivated ALL plugins and reinstalled the theme.. nope, not working. I even tried different versions of the theme and same thing. Is there any way to keep my site intact but do a fresh install of wordpress and still have everything there? Im so desperate at this point. Thanks very much :D

    Zach

  21. vtxyzzy
    Member
    Posted 3 years ago #

    If it is not the plugins, then it is more likely that you have been hacked. There is likely some malware code somewhere that is adding the extra code to functions.php.

    You can reinstall WP without losing anything by going to Dashboard->Updates and clicking 'Reinstall Now', but I doubt that it will clear the problem.

    Can you put the infected functions.php in a pastebin and post a link to it here so I can see the code?

  22. zacho56
    Member
    Posted 3 years ago #

    Hey. Here is the code for the arras theme functions.php

    http://pastebin.com/ASeUsE2r

    thanks!

  23. zacho56
    Member
    Posted 3 years ago #

    Any luck friend? I dont know what to do :'( :'( this will ruin my business

  24. vtxyzzy
    Member
    Posted 3 years ago #

    The code in the file you posted didn't LOOK like malicious code, so I don't know what to make of it.

    Look to see if that code is in any other functions.php file. Go to Admin->Appearance->Editor and select a different theme from the dropdown on the right. Edit its functions.php and see if you find any of the bad code there.

Topic Closed

This topic has been closed to new replies.

About this Topic