• Resolved Fee

    (@wdfee)


    Hello, when activating the plugin the site crashes completely with error:

    Fatal error: Uncaught Error: Call to a member function put_contents() on null in /[…]/plugins/astra-sites/inc/classes/class-astra-sites-importer-log.php on line 206
    Error: Call to a member function put_contents() on null in /[…]/plugins/astra-sites/inc/classes/class-astra-sites-importer-log.php on line 206
    Call Stack
    # Time Memory Function Location
    1 0.0008 555672 {main}( ) …/plugins.php:0
    2 0.0011 604520 require_once( ‘/[…]/wp-admin/admin.php’ ) …/plugins.php:10
    3 0.3962 46019176 do_action( ) …/admin.php:175
    4 0.3962 46019552 WP_Hook->do_action( ) …/plugin.php:484
    5 0.3962 46019552 WP_Hook->apply_filters( ) …/class-wp-hook.php:316
    6 0.4000 46230272 Astra_Sites_Importer_Log->has_file_read_write( ) …/class-wp-hook.php:292
    7 0.4000 46230272 Astra_Sites_Importer_Log::log_dir( ) …/class-astra-sites-importer-log.php:71

    Newest versions of WordPress 5.7.2 (fresh installation), Astra Theme 3.6.1 and Starter Templates Plugin 2.6.12,
    PHP 7.3.8

    • This topic was modified 3 years, 8 months ago by Fee.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Fee

    (@wdfee)

    I deactivated your plugin via database, looked into your code and started some trials. There seem to be problems with the filesystem functions. I changed all lines in your plugin using get_contents and put_contents to use plain @file_get_contents and @file_put_contents instead. With this it worked and I successfully imported the desired template. But maybe you want to check this for other users in future.

    Hello @wdfee

    Sorry, we haven’t come across a similar issue at our end. As we use the WordPress file system API. We are unsure why it throws the error.

    If possible, please open a ticket through our Support Portal so that we can take a look at the environment and ensure that we find the cause.

    You can simply drop an email at [email protected] and mention the following Support Topic.

    Looking forward to hearing from you.

    Plugin Support Herman Asrori (BSF)

    (@bsfherman)

    Hi @wdfee,

    I am closing off this topic due to the lack of activity. Feel free to reply to this thread or open a new topic if you need further assistance.

    Kind regards,
    Herman ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error on plugin activation’ is closed to new replies.