Fatal error: Cannot redeclare _verifyactivate_widget() (21 posts)

  1. samuelthomson
    Posted 3 years ago #

    Hello, I currently have a domain-based multisite version of wordpress installed with a primary blog (my first WP blog) and a secondary blog (my second WP blog). I want to give each blog a different theme.

    I created the theme for the SECONDARY blog first using the "Bigsquare" WP theme and it works well. Now I want to go back to the primary blog and create a theme based on the "Hybrid Skeleton" theme but I'm having the following problem:

    Whenever I try to activate the "Skeleton" theme I get a message like:

    Fatal error: Cannot redeclare _verifyactivate_widget() (previously declared in /home/artistf/public_html/wp-content/themes/skeleton/functions.php:52) in /home/artistf/public_html/wp-content/themes/hybrid/functions.php on line 427

    I'm sure this must have been asked before, but I can't find the answer: can someone tell me what this message refers to? I imagine it has something to do with widgets, but I've tried de-sctivating and re-activating them all and I haven't yet been able to identify what the problem is, or how to get round it.


  2. samuelthomson
    Posted 3 years ago #

    Also, I can't access the dashboard for the site that I tried to activate "skeleton" with, or my Network Admin dashboard.

  3. If you delete the theme folder, you should be able to get back in.

  4. samuelthomson
    Posted 3 years ago #

    Thanks for your help Ipstenu,

    I actually replaced the whole "public_html" folder with a previous version. I can now access the dashboard but only in a really weird way. Basically I keep getting this error message:

    Fatal error: Cannot redeclare _verifyactivate_widget() (previously declared in /home/artistf/public_html/wp-content/themes/big-square-1.2/bigsquare/functions.php:16) in /home/artistf/public_html/wp-content/themes/big-square-1.2/bigsquare/libs/functions/functions.php on line 134

    This error seems to occur whenever I try to load a page of the dashboard for my blog that uses the "bigsquare" theme (or any page of the actual blog). I get round it by going to the file specified in the error message and replacing it with an old version of "functions.php" and refreshing the page that gave me the error message.

    This allows me to access the required page, but I have to do this every time I try to load a new page on the dashboard or the actual blog.

    All my plugins are de-activated for both blogs, and for the multisite network in general.

    I could try deleting the "big square" theme folder, re-installing it from scratch and then customizing it again, but
    a) is that necessary (because I spent ages customizing it)?
    b) will I just end up in the same position again regarding additional themes?

    Is there a problem with using different parent themes in general, or should I be able to figure this one out? Like I say, everything was working fine before I tried to activate a second theme and I thought that replacing the whole "public_html" folder would at least put things back the way they were, but now something must be changing the "functions.php" file.


  5. samuelthomson
    Posted 3 years ago #

    I found an instance of a similar issue here, but there is no solution given:


  6. You need to get rid of that theme.


    Delete THAT folder. The theme is broken, and causing this.

  7. samuelthomson
    Posted 3 years ago #

    OK, thanks again for clarifying that.

    Once it has been removed, is it worth trying to re-install it from scratch, or is it always going to mess up?

    I'll start trying to re-instal it anyway.

  8. Depends on things :)

    Did you make modifications to the theme directly?

    Have you tried turning off all plugins?

  9. samuelthomson
    Posted 3 years ago #

    Yes, I changed one or two things in the header and footer using the "edit" button on the wordpress dashboard. I also used dreamweaver to edit a few things. I cant remember exactly what I changed but it was nothing major, just little pokes here and there (yeah right) to make the theme look a little bit different.

    But what I dont understand is that the problem persisted after I deleted the entire "public_html" folder and replaced it with a previous version from when it worked fine. So presumably there was something outside this folder that was messing things up.

    I'm going to try re-installing the "big square" theme and see what happens

  10. Matthew W
    Posted 3 years ago #

    You could download your theme, reinstall, and then reintroduce the theme file by file until you identify which one contains the problem. functions.php is the most likely culprit.

  11. Yeah, I'd get a clean copy of the theme from source.

    And make a child theme if you want to edit it!

  12. samuelthomson
    Posted 3 years ago #

    Hello, I tried re-installing the theme from scratch but the problem persisted. I also tried replacing the entire "public_html" folder with a version that worked previously and it still persisted.

    I've now tried switching themes to a theme called "trending", which worked fine until I tried to create and activate a child theme, then I got a very similar error message:

    Fatal error: Cannot redeclare _verifyactivate_widget() (previously declared in /home/artistf/public_html/wp-content/themes/trending_cgportfolio/functions.php:44) in /home/artistf/public_html/wp-content/themes/trending/functions.php on line 272

    I dont have any activated plugins, can you recommend anything else?

  13. Deleted the massive codeblock.

    1) PLEASE use CODE tags, not blockquote.

    2) If your code is 10 lines or more, please post it to pastebin.com and link to it here. You make our spam filter unhappy :)

    When you make your child theme, you're not copying down the functions.php into the child theme folder, are you?

  14. samuelthomson
    Posted 3 years ago #

    oh, sorry, i didn't know about the code rules.


    No, thats not what I'm doing. I'm using an out-of-the-box child theme from here:

    The functions.php in the child theme folder looks fine right up to the point when I activate it on either of my blogs using the dashboard.
    At that point, a whole lot of code is coppied into it from somewhere - but I don't know where.

    After that happens, I can replace it with a new version of functions.php, but again the same thing happens to it as soon as I access a new page on my dashboard or refresh the front-end blog page.

    There doesn't seem to be a problem with parent themes, only child themes.

    I'd say that my wordpress has been hacked, only this seems a bit melodramatic.

  15. Sidebar - Justin offers support for his themes on http://themehybrid.com (it's $25/year).

    Re-read that error eh?

    Fatal error: Cannot redeclare _verifyactivate_widget() (previously declared in /home/artistf/public_html/wp-content/themes/trending_cgportfolio/functions.php:44) in /home/artistf/public_html/wp-content/themes/trending/functions.php on line 272

    Trending is the parent theme, if THAT works, then it's trending_cgportfolio.

    Did you download a FRESH copy of that theme from it's source?

    Did YOU make that child theme or get it somewhere else?

    Did you make ANY changes to the child OR parent themes directly?

  16. samuelthomson
    Posted 3 years ago #

    Ok, just to backtrack, I tried it with trending_cgportfolio (where I only changed the name) AND also I tried it with a version of the fresh downloaded child theme sample that I linked to, with exactly the same results. As I recall, even the specified lines (eg, 272) were the same.

    I already signed up to Justin's $25 support service, I'm waiting for him to get back to me about it.

    In the mean time, I'm backing everything up and basically preparing to totally re-write the blogs. This sounds like overkill but I havent been able to get to the bottom of this

  17. Okay, that's good :) In that it's the theme and not a hack. So ... yeah, wait for Justin. It wasn't clear that you were using the default trending_child theme since you had smoething else in your error.

  18. samuelthomson
    Posted 3 years ago #

    I don't know if it is the theme, because the same issue apparently happens with both the BigSquare theme and the Trending theme.

    I hope he gets back to me soon, im pretty much poised to delete everything and start all over again, I have to get my portfolio online tomorrow so I can apply for a particular job.

  19. Do OTHER themes work? Like can you use twentyEleven?

    My thought is that you've somehow copied the functions.php from the parent into the child, which is a big no-no.

  20. samuelthomson
    Posted 3 years ago #

    I...I...ok, not sure HOW exactly, but I've made some progress somehow...

    I think I did the following in this order:

    - Remove ENTIRE contents of the public_html folder
    - found a saved version of this folder from ages ago and deleted the BigSquare theme from it.
    - uploaded the rest of this folder to public_html
    - installed the Trending parent theme
    - created a new child theme using very basic settings
    - created a 2nd new child theme in a similar way for the 2nd blog
    - activated both of these and tested them
    - downloaded a fresh version of BigSquare
    - activated it for the 2nd blog

    now I seem to have both themes working...

    I guess Ill see if they are both still working after I make some adjustments to the Big Square theme

    thanks for your help, I'm hoping thats it, but I guess I might be back here within the hour

  21. Do me a huge favor. Stop deleting the whole public_html folder.

    No matter what, unless your whole server was compromised, you never ever have to do that. In fact, we don't even tell you to do that if you're hacked, we tell you to delete the wp-admin and wp-includes folders.

    You're taking a flamethrower to your creme brule, man.

    You should only have been deleting the wp-content/themes folder, AT MOST, unless you KNOW you made other changes. Why? Because now you may have deleted some of your uploaded images.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.