• Resolved Jose

    (@giuse)


    Hello,

    if your plugin is active the shortcode added by the Oracle Cards plugin is not parsed. The shortcoe of Oracle Cards looks like [oracle_cards deck=”3″].

    I see n the file https://plugins.trac.www.ads-software.com/browser/all-in-one-seo-pack/tags/4.2.1.1/app/Common/Traits/Helpers/Shortcodes.php#L100 at line 100:

    /**
    	 * Returns the content with only the allowed shortcodes and wildcards replaced.
    	 *
    	 * @since 4.1.2
    	 *
    	 * @param  string $content      The content.
    	 * @param  array  $tagsToRemove The shortcode tags to remove (optional).
    	 * @param  int    $postId       The post ID (optional).
    	 * @return string               The content with shortcodes replaced.
    	 */
    	private function doShortcodesHelper( $content, $tagsToRemove = [], $postId = 0 ) {
    		global $shortcode_tags;
    		$conflictingShortcodes = array_merge( $tagsToRemove, $this->conflictingShortcodes );
    		$conflictingShortcodes = apply_filters( 'aioseo_conflicting_shortcodes', $conflictingShortcodes );
    
    		$tagsToRemove = [];
    		foreach ( $conflictingShortcodes as $shortcode ) {
    			$shortcodeTag = str_replace( [ '[', ']' ], '', $shortcode );
    			if ( array_key_exists( $shortcodeTag, $shortcode_tags ) ) {
    				$tagsToRemove[ $shortcodeTag ] = $shortcode_tags[ $shortcodeTag ];
    			}
    		}

    So, it looks like your plugin removes shortcodes of other plugins if they are considered conflicting shortcoes.
    I wonder what is strange with the shortcode [oracle_cards deck=”3″]. How should be the shortcodes to don’t be removed by your plugin?

    Thank you in advance.

    Best regards

    Jose

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @giuse,

    We re-register any conflicting shortcodes we’ve removed right after we parsed the content, so this isn’t the issue here. Also, this isn’t a shortcode that is included in our list of known conflicting shortcodes.

    However, the shortcode is probably just failing to render correctly because it’s been parsed twice (once by AIOSEO, the second time when the post content is loaded). This happens a lot with a variety of shortcodes for different reasons. It’s due to the nature of how shortcodes work and it’s something we cannot fix on our end.

    For that reason we’ve introduced a setting so that you can disable shortcode parsing by AIOSEO. It’s disabled by default for new users since 4.2.0 going forward, but enabled for people who already had the plugin installed before that version.

    You can find and disable this setting under Search Appearance > Advanced. Here’s our documentation on it in case you’re interested – https://aioseo.com/docs/running-shortcodes/

    Thread Starter Jose

    (@giuse)

    Hi @arnaudbroes

    thank you very much! This was a big help.

    Have a great day!

    Jose

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conflict with Oracle Cards’ is closed to new replies.