Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author David Artiss

    (@dartiss)

    This is not an issue with the plugin, as it does not add any such tags to the content. Please check the extra tags are not present within the shortcode by looking at the post/page in the HTML editor.

    If not present, it may be your theme incorrectly inserting them.

    David.

    Thread Starter Steven Vachon

    (@prometh)

    I just edited my post with how I’m using this plugin in my content

    Plugin Author David Artiss

    (@dartiss)

    And I’m assuming the HTML Editor view is no different?

    If so, I’d try the following (if you can)…

    • Look in your site’s Writing settings. The 2nd one down is named “WordPress should correct invalidly nested XHTML automatically”. Is this ticked? If so, try unticking it and see if the problem goes away.
    • Disable all other plugins. Again, check to see if this resolves the issue.
    • If the above two fail then you can try switching, just for the moment, to another theme, such as Twenty Twelve.

    As I’ve said my plugin doesn’t do anything to add those extra tags so I can only assume something else is adding them in.

    David.

    Thread Starter Steven Vachon

    (@prometh)

    Automatic XHTML correction was already disabled. When disabling all other plugins, it still inserts the additional <p> tags.

    The old versions of this plugin worked fine.

    I have my WordPress installed to a sub-directory, in case you haven’t tested that scenario. Here is the page in question: https://www.svachon.com/about-this-site/

    Thread Starter Steven Vachon

    (@prometh)

    Also, the issue remains when using the Twenty Twelve theme.

    Thread Starter Steven Vachon

    (@prometh)

    OK, I found some time to investigate it myself. The problem appears to be in WordPress itself.

    <ul>[plugins_list cache="no" format='<li>#Title#</li>'/]</ul>

    function apl_plugins_list_shortcode( $paras ) {
    
    	print_r( htmlspecialchars($paras['format']) );
    
    	extract( shortcode_atts( array( 'format' => '', 'show_inactive' => '', 'cache' => '', 'nofollow' => '', 'target' => '' ), $paras ) );
    
    	print_r( htmlspecialchars($format) );
    
    	$output = get_plugins_list( $format, $show_inactive, $cache, $nofollow, $target );
    
    	return $output;
    }

    It adds the <p>

    We’ll see how this goes: https://core.trac.www.ads-software.com/ticket/23694

    Plugin Author David Artiss

    (@dartiss)

    It doesn’t add it to mine or any of WP sites I run, though, so I suspect either a WordPress configuration issue or theme/plugin problem.

    I see from the code above you’ve added some output to the plugin. At what stage is the paragraph tag appearing?

    David.

    Thread Starter Steven Vachon

    (@prometh)

    Well, it’s a fresh WordPress installation with all other plugins disabled and using Twenty Twelve theme. The paragraph tag is added immediately after using the shortcode, so it must be WordPress related.

    Plugin Author David Artiss

    (@dartiss)

    You’ve added 2 print_r statements to the above code – are you saying the paragraph tag appears when the first print_r is displayed?

    David.

    Thread Starter Steven Vachon

    (@prometh)

    Yes.

    Plugin Author David Artiss

    (@dartiss)

    Ok, this would suggest that the paragraph tags are being added when the shortcode is being processed by WP. A quick Google shows lots of people having such issues with shortcode processing and it appears to be related to the sequence in which WordPress runs a filter routine.

    The following link best summarises it – best to read the comments too.

    https://wpforce.com/prevent-wpautop-filter-shortcode/

    The conclusion appears to be that the problem should not be happening unless the processing priorities have been changed.

    David.

    Thread Starter Steven Vachon

    (@prometh)

    I have not altered processing priority values.

    Plugin Author David Artiss

    (@dartiss)

    Ok. But in that case I’m not sure how I can help further – as you’ve identified this is a WordPress problem.

    David.

    Thread Starter Steven Vachon

    (@prometh)

    Yeah, I know, you’re right. I’m hoping the WordPress team has good news in the future.

    I help to maintain a plugin that makes extensive use of more than 12 custom shortcodes and we are not seeing anything like this. So I humbly suggest that the issue is in the plugin – not WordPress core.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Erroneous paragraph tags issue still not fixed’ is closed to new replies.