I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

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

dashed-slug.net Forums Transition from wallets 5.x to 6.0.0 Plugin could not be activated because it triggered a fatal error.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12198
    blacklevel
    Participant

    I deactivated the wallets plugin, uploaded a new version, and when I try to activate it again, I get this error:

    Plugin could not be activated because it triggered a fatal error.
    Fatal error: Cannot declare class Parsedown, because the name is already in use in /.../wp-content/plugins/wallets/third-party/Parsedown.php on line 16

    I tried in different ways, I tried in different installations – always the same..

    Please help..

    #12199
    alexg
    Keymaster

    Ah yes, thank you very much for reporting this.

    It is partly my fault, and partly the fault of another plugin that you are using. Both plugins attempt to load the Parsedown library, and both plugins don’t check if the library is already loaded.

    The issue is here: https://github.com/dashed-slug/wallets/blob/6.0.0-RC4/admin/documentation.php#L15-L16

    I will correct this in the next release. In the meantime, you can delete these lines, then, further down in the file, where the library is being used, you can add the following:

    if ( ! class_exists( 'Parsedown' ) ) {
        require_once DSWALLETS_PATH . '/third-party/Parsedown.php';
    }
    
    if ( ! class_exists( 'ParsedownExtra' ) ) {
        require_once DSWALLETS_PATH . '/third-party/ParsedownExtra.php';
    }
    

    right above the following code:

    // render markdown
    $pd = new \ParsedownExtra;
    $html = $pd->text( $markdown );

    Thank you for noticing and reporting this issue. I will apply the patch on the next version.

    with regards

    #12203
    blacklevel
    Participant

    Hello @alexg,

    thank you for your fast answer!
    But anyway I have fixed it by simple deactivating plugin WP-optimize..
    All works perfect now.. but I am saddened by a couple of other things: Precentage fee

    #12210
    alexg
    Keymaster

    Hello,

    OK, good to hear that.

    By the time the next version is out, it will be possible to use the plugin along with other plugins that use the Parsedown library.

    with regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.