Skip to:
Content
Pages
Categories
Search
Top
Bottom

Serious Bug and Fatal error when creating new post

  • Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    @imath, This plugin has a serious bug, whenever new post is made, the error occurs.

    Fatal error: Call to undefined function bp_code_snippets_the_content_own_snpt() in /home/content/**/****/html/wp-content/plugins/bp-code-snippets/bp-code-snippets.php on line 406

    Only needed solution by deleting

    return bp_code_snippets_the_content_own_snpt($content, $data->primary_link);

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    + the window that is supposed to pop up, does not function, goes to new window or tab making it impossible to put the code in as any user, Admin, or subscriber.

    Avatar of imath
    imath
    Moderator

    @imath

    Hi @gunju2221,

    Thank you for your feedback.

    1. Fatal error :
    You’re right : if you activate code snippets for forums and not for posts, then the function that filters activities doesn’t find the function because the necessary file is not included. To correct this behavior, you can replace the function `bp_code_snippets_filter_activity_content_before_save($content, &$data)` at line 401 by this new one :
    `function bp_code_snippets_filter_activity_content_before_save($content, &$data){
    if ( ($data->type == “new_forum_post” || $data->type == “new_forum_topic”) && function_exists(‘bp_code_snippets_forum_highlight’)){
    return bp_code_snippets_forum_highlight($content, $data->primary_link);
    }
    elseif($data->type == “new_blog_post” && function_exists(‘bp_code_snippets_the_content_own_snpt’)){
    return bp_code_snippets_the_content_own_snpt($content, $data->primary_link);
    }
    else{
    return $content;
    }

    }`
    I’ll make an upgrade in WP plugins directory to correct this bug this week end.

    2. It looks like thickbox does not load on your configuration. It works on mine as the plugin calls it on line 581 of bp-code-snippets.php (i just tested on WP 3.0.4 + BP 1.2.7)

    Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    @imath, Make sure you remove the last “}” at the end or remind your users to because it will cause an “unexpected” fatal error.

    About the window popup, it was functioning before, I have no idea what happened, maybe I should go to the earlier version, as the plugin is useless without it.

    Avatar of imath
    imath
    Moderator

    @imath

    just added an upgrade on WP plugins directory > version 1.3.2. This should fix the ‘fatal error threat’ for everyone.
    For the thickbox, i can’t tell you as it works on my config, maybe another plugin is interfering… You should look into the source code of your page if thickbox css and js are loaded…
    Does it work when using it to add snippet to a blog post in the wordpress backend ?

    Avatar of Virtuali
    Virtuali
    Participant

    @gunju2221

    Yes, it works on wordpress backend post creation.

    I’ll look into my plugins, I recently did work on the forums to improve CSS, but that should not matter, the only real forum plugin installed is oembed, @nuprn1‘s forum additions installed, and thats about it, nothing really conflicting that I see.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.