• Resolved David Wiener

    (@dwiener)


    When I try to update my right sidebar widget php code from the dashboard I get a fatal php error. This is a catch-22 since it blocks me from getting into the widget php code in order to fix it.

    Is there some way to bypass the error and get to the php code in order to fix it or is there somewhere in the database that I can access the php code to manually correct the problem or delete the widget.

    Thanks,
    Dave.

    • This topic was modified 2 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @dwiener

    You can manually go to wp-contents/plugin folder and rename the plugin that offers you the ability to add PHP code as widgets. This will cause the plugin to be deactivated to get your site back.

    Not sure whether the problem will be back as soon as you reactivate it or if you won’t be able to activate the plugin at all. So, you would have to check with docs of this plugin or reach out to their support.

    Thread Starter David Wiener

    (@dwiener)

    The site actually works ok and the rest of the dashboard works ok. The problem is with widget functionality which I believe is native to WordPress. I get a fatal error when I try to go into the widgets module of the dashboard which stops me from updating the widget. It’s a catch-22. Maybe if I could find the code in the database I think I could patch it to get past this problem.

    Thread Starter David Wiener

    (@dwiener)

    Problem solved. WordPress updated Widgets to Block Widgets which now treats PHP includes a little differently. Function names now cannot be the reused in different widget areas which caused the error. I found the widget PHP code in the DB ‘options’ table at option_name = ‘widget_execphp’. I manually changed the function names in the PHP code respecting the JSON rules and my widget dashboard admin is working and is now Block Widgets and I have regained access to my widget coding.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t access sidebar widget to fix PHP error.’ is closed to new replies.