WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Stray Quotes triggers a fatal error (4 posts)

  1. corpodibacco
    Member
    Posted 6 years ago #

    Hi, I am the author of the "Stray quotes" plugin
    italyisfalling.com/stray-quotes

    I am struggling to make it 2.5 compatible, so far no luck.
    It always triggers a nondescript fatal error upon activation.
    When updating to 2.5 without deactivating and reactivating it though, it works fine...

    The 2.5 documentation is still not very complete and I am not smart enough to figure this problem out. Anyone out there who can suggest me where to start looking or what could be the problem?

    much obliged,
    -c.

  2. corpodibacco
    Member
    Posted 6 years ago #

    Ok, I realized this much. The error is triggered by this sentence, at the very beginning of the code:

    define('WP_QUOTES_TABLE', $wpdb->prefix . 'quotes');
    define('WP_STRAY_QUOTES_TABLE', $wpdb->prefix . 'stray_quotes');
    define('WP_QUOTES_PAGE', '<!--wp_quotes_page-->');
    $dir = basename(dirname(__FILE__));
    if ($dir == 'plugins') $dir = '';
    else $dir = $dir . '/';
    define('WP_STRAY_QUOTES_PATH', get_option('siteurl') . '/wp-content/plugins/' . $dir);

    if this is commented, the plugin gets activated. The functions would trigger an error, because of the variables undefined, but it gets activated nonetheless.

    So it seems that the error is somewhere in the use of "define" or in the paths. Or... I don't know.
    Any idea?

    Thanks.

  3. corpodibacco
    Member
    Posted 6 years ago #

    I resolved this by declaring $wpdb global. The new version of the plugin is out and working.

  4. physlab
    Member
    Posted 6 years ago #

    Where do I change the fonts within Stray-Quotes? I much preferred the original fonts to the new ones.

    Physlab

Topic Closed

This topic has been closed to new replies.

About this Topic