• Resolved kaz-nishimura

    (@kaz-nishimura)


    We have been working on adding a photo gallery to an existing site.
    The site has a production site and a test site on the same server.
    We have developed the new feature on the test site and it is almost complete, so we decided to implement it on the production site.
    However, when we install and activate NextGen Gallery 3.0.16 on the production site, the site corrupts and we have to delete the plugin manually.

    After the activation, the following message appear during WordPress initialization:
    Error thrown: Call to undefined function wp_get_current_user()

    Since the test site is a “All-in-One WP Migration” copy of the production site (a little bit older though), the environment must be almost the same.
    On the test site, we first installed NextGen Gallery 3.0.13 or older and then updated to 3.0.16, which still works fine.

    We cannot deactivates any plugins on the production site.
    Any suggestions?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter kaz-nishimura

    (@kaz-nishimura)

    FYI, NGG tables are created in the database and some NGG options are saved in the option table. The error seems to occur after these in the activation process.

    Plugin Contributor Imagely

    (@imagely)

    Hi @kaz-nishimura,

    wp_get_current_user() is a native WordPress function, so it should not normally be undefined unless something else is going on.

    Let’s first check the server settings to make sure you have everything up to date. Reach out to your hosting provider and confirm they have the www.ads-software.com Requirements settings in place:

    MySQL v5.6 (or higher)
    PHP 7.2 (or higher)

    Memory limit: 250MB (or higher)
    Upload limit: 50MB (or higher)
    Post limit: 50MB (or higher)
    /wp-content directory has sufficient permissions (i.e. 755)

    Mihai

    Thread Starter kaz-nishimura

    (@kaz-nishimura)

    I found that the following plugins are different in their version between the production site and the test site:
    WPML CMS Nav 1.4.23
    WPML Media 2.3.8
    WPML Multilingual CMS 4.0.8
    WPML String Translation 2.8.8
    WPML Translation Management 2.6.8

    However, I cannot locate the line that causes the error since the “Error Thrown” message does not show the filename where it happens (even with WP_DEBUG true), and there is no output in the PHP log file.
    I made a tiny plugin that only includes plaggable.php and activated it to solve this problem.

    Plugin Contributor Imagely

    (@imagely)

    Hello!

    I am going to mark this as resolved as I assume you have found a solution. Please feel free to reply again if you still have questions.

    – Gaby

    Thread Starter kaz-nishimura

    (@kaz-nishimura)

    I’ve only found a workaround solution.
    If not NGG, at least one of the plugins calls wp_get_current_user() in the plugin initialization, directly or through another action/filter that is triggered in init.
    The functions defined in pluggable.php should not be used in the initialization.
    I don’t have enough time to persue the culplit.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Activation of 3.0.16 fails on new site’ is closed to new replies.