Support » Plugin: Widget Builder » [Plugin: Widget Builder] Update do not activate and give error

  • Resolved abrahamgpg


    I updated the plugin on my site using the automatic update feature.

    I got the error message

    Parse error: syntax error, unexpected T_FUNCTION in /public_html/wp-content/plugins/widget-builder/classes/widget-builder.php on line 146

    I used ftp to rename the plugin so that it can be deactivated automatically.

    When I try to activate it again I see the error message

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected T_FUNCTION in /public_html/wp-content/plugins/widget-builder/classes/widget-builder.php on line 146

    The plugin does not activate.

    Please help. I need this to work.

    Thanks in advance.


Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Timothy Wood


    Can you tell me what version is showing in the plugin list? If you can change line 146 in widget-builder/classes/widget-builder.php to if you are not using this on multisite:

    add_action( 'wp_dashboard_setup', function( $widget ) use ( $widget ) {

    Also it would be beneficial to know what version of PHP you are using.

    De-activate all the plugins via PHPMyAdmin

    You will need to log into cPanel, and open the PHPMyAdmin interface. Then select the WordPress database, and browse inside the “wp-options” table. Look for the “active_plugins” column, and edit it. Inside the “options_value” field you will find something like this:


    These lines represent the active plugins in your blog (you can read more on this issue here). Delete them all and save. This should automatically de-activate every plugin. Now check if your blog is live again, and if the admin area is working. They should be.

    @ Timothy Wood

    Thanks for the reply.

    Widget Builder Version 1.4
    My PHP is Version: 5.2.17

    I did your suggested changes in line 146 in widget-builder/classes/widget-builder.php

    No change. Still the same error.

    Thanks again.

    I get the same error. Except, I only got the error when I just updated WordPress today to 3.4.2. It was working fine before I updated, and like a fool I didn’t do a backup.

    Parse error: syntax error, unexpected T_FUNCTION in /home/blazedri/public_html/wp-content/plugins/widget-builder/classes/widget-builder.php on line 146

    Thankfully, since I am using WordPress MU, I was able to just delete the plugin off the network and it made my site work again. However, those front page widgets are now obviously missing.

    I was using the latest version of Widget Builder (1.4).

    Plugin Author Timothy Wood


    @abrahamgpg – anonymous functions are not available until PHP 5.3. I will have a hotfix ready for you this weekend. If you do not need dashboard widgets I would recommend downgrading to 1.3 in the meantime.

    @abiahjoshua – I have not tested this on WP 3.4.2 yet – I will tackle testing 3.4.2 compatibility this weekend as well.

    Thanks Timothy.

    I don’t need the dashboard widgets, but where can I get the downgraded version.

    Just like @Abiajoshua my frontpage widgets are also missing and I need them.

    Plugin Author Timothy Wood


    Let me know if does not work for you and I can send you a copy of my local repo reverted to v1.3.

    The downgraded plugin work. YAY. 🙂

    Thanks for all your help Timothy.

    I will keep my eyes peeled for the upgrade fix. Any ETA on that?

    Then again the ver 1.3 works nicely, so… Don’t rush.

    Kudos to you for the quick replies. 🙂

    Plugin Author Timothy Wood


    No ETA – I’ll have to reconfigure my dev instance to support PHP 5.2 – I hope to do it this weekend but may be beginning of the week before I can dedicate a few minutes to testing.

    Glad it’s working again for you – will update this forum once resolved.

    The downgraded 1.3 works for me as well on WordPress 3.4.2.

    The downgraded 1.3 link that you gave seems to work fine on my site also.

    Plugin Author Timothy Wood


    I have released version 1.5 this resolves issues with PHP 5.2 compatibility. You may download automatically from the .org repo or manually replace your installation with the download from . Please let me know if you continue to have any issues.

    This is seems to be working great.

    Thanks for the speedy update.

    Timothy, You Rock. 🙂

    Plugin Author Timothy Wood


    I’m glad this helped you out! If you don’t mind selecting “Works” for your version of WP/Plugin in order to let folks know the support data.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Widget Builder] Update do not activate and give error’ is closed to new replies.