WordPress.org

Forums

Shortcodes Pro
Shortcodes in Widgets Stopped Working (2 posts)

  1. treccase
    Member
    Posted 2 years ago #

    Hi,

    Great plugin, but for no reason completely stopped displaying shortcode in a widget instead just displays my shortcode tag without executing it.

    I didn't change any settings, just edited the shortcode and saved. Since then I re-installed the plugin completely, deactivated and removed all plugins, extra themes from the wordpress directory. So all I have is your plugin activated and the theme. Still can't get them back to work again. They work fine in a post or page, but no matter what I do they won't work in a widget (standard wp widget that adds text to sidebar).

    Shortcode is php, has 1 parameter that was not used. Was called like [do action="test1" a="android"/] , and the php code was (i simplified it since before much more complex code was working fine).

    $outputccc ="Shortie da Kode";
    return $outputccc;

    Any ideas what could be happening here or have you seen any behavior like this ?

    I appreciate any help in advance and wanted to consult you guys before I start debugging it.

    Thanks,

    TT

    http://wordpress.org/extend/plugins/shortcodes-pro/

  2. treccase
    Member
    Posted 2 years ago #

    I installed your competitor's plugin, and as soon as I activated it, your shortodes started working in the widget. And if I turn the competitor plugin off, your shortcodes stop working in the widget. It is hilarious.

    I looked at all sql being executed and compared, and the only difference is that when your competitor plugin is activated there is just one extra database call, take a look:

    SELECT DDB_4_posts.* FROM DDB_4_posts WHERE 1=1 AND DDB_4_posts.post_name = 'test1' AND DDB_4_posts.post_type = 'shortcodepro' AND (DDB_4_posts.post_status = 'publish') ORDER BY DDB_4_posts.post_date DESC 
    
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/xxx/template_builder.php'), xxx_elements, xxx_columns, dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, WP_Widget_Text->widget, apply_filters('widget_text'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, MV_ShortcodesPro_Base->do_shortcode, MV_ShortcodesPro_Base->get_by_slug, get_posts, WP_Query->query, WP_Query->get_posts

    There is 0 difference in the firebug html when comparing the versions (i removed the jquery/css your competitor was injecting and your plugin works perfectly, but as as soon as i deactivate competitor, the widget no longer executes the shortcode)

    Your plugin with competitor activated:

    </div><!-- .column (end) --><div class="column grid_6 last"><div class="widget-area"><aside id="text-3" class="widget widget_text"><div class="widget-inner"><h3 class="widget-title">Top10</h3>			<div class="textwidget">shortie da code</div>

    Your plugin without competitor activated:

    </div><!-- .column (end) --><div class="column grid_6 last"><div class="widget-area"><aside id="text-3" class="widget widget_text"><div class="widget-inner"><h3 class="widget-title">Top10</h3>			<div class="textwidget">[do action="test1" a="android"/]</div>

    Weird eh? You are missing something important. ultimate shortcode is the plugin that i call your competitor, and i like it less than yours, since its made mostly for newbies but in any case...

    Thanks,

    Nick

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shortcodes Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic