Support » Plugin: Glossary » Internal Server Error 500 on Upgrading Plugin

  • Resolved SJF


    With WP Debug on, the following error appears when activating the latest version of Glossary. I’m upgrading to 1.4.8 from 1.4.4 and receive this error:

    Fatal error: Uncaught Error: Call to a member function add_cap() on null in X:\www\wp-content\plugins\glossary-by-codeat\includes\Glossary_Upgrade.php:80
    Stack trace: #0 X:\www\wp-content\plugins\glossary-by-codeat\includes\Glossary_Upgrade.php(39): Glossary_Upgrade->add_admin_cap()
    #1 X:\www\_core\wp-includes\class-wp-hook.php(298): Glossary_Upgrade->activate('')
    #2 X:\www\_core\wp-includes\class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #3 X:\www\_core\wp-includes\plugin.php(453): WP_Hook->do_action(Array)
    #4 X:\www\_core\wp-admin\admin.php(154): do_action('admin_init')
    #5 X:\www\_core\wp-admin\edit.php(10): require_once('X:\www\\_core\\wp...')
    #6 {main} thrown in X:\www\wp-content\plugins\glossary-by-codeat\includes\Glossary_Upgrade.php on line 80

    I thought it may have been an upgrade bug since the last changelog for 1.4.8 says “Upgrade routine wasn’t working” – so I downloaded the zip directly from its WordPress Plugin Page and manually installed it, but still get an internal server error when activating it.

    (Just a note of clarification on the “_core” directory in the error log. We have moved WP’s core files in here for subrepo version controlling. This shouldn’t affect anything unless the plugin expects it to be somewhere else, and while the error doesn’t mention it, I thought I would, just in case it is important to know.)

    • This topic was modified 10 months, 4 weeks ago by  SJF. Reason: (URL is a dev URL and cannot share publicly)
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi SJF,
    we got the problem (the stacktrace was very helpful).
    THe issue was that we add the capabilities to the default roles on WordPress but probably in your installation they are missing.
    So we fixed on Glossary_upgrade.php file using if ( !is_null( $role ) ) {.
    So if you want to patch the code is pretty easy, we are evaluating if release another version today with that fix 🙂

    Alright thank you @mte90, I’ll wait for the new version instead of patching it myself 🙂 thanks!

    I’ve updated the plugin and it works! But just wanted to let you know about one small thing…

    When it was active and I went to update it, it said it couldn’t because it couldn’t create a new folder. When I looked, inside of /plugins/glossary-by-codeat/ it was empty. I had to manually download and reinstall and reactivate the plugin. Works fine, and that may have been just my setup for some reason, but thought I’d let you know incase it is a sign of something bigger.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Internal Server Error 500 on Upgrading Plugin’ is closed to new replies.