• Resolved jondaley

    (@jondaley)


    I see various people complaining about the wpautop filter over the years, and some various fixes, and some complaining certain plugins in combination with the-events-calendar (like https://theeventscalendar.com/support/forums/topic/conflict-with-toggle-wpautop-plugin-makes-community-events-unusable/ ) but I don’t have that plugin installed.

    I tried putting:

    remove_filter( 'the_content', 'wpautop' );                                                                                                                                                
        function tsl_remove_autop($post){                                                                                                                                                     
              // remove wpautop for tribe community events                                                                                                                                    
              // without this extra <p> tags are generated in these pages by wordpress?  Another plugin?                                                                                      
            remove_filter('the_content', 'wpautop');                                                                                                                                          
            remove_filter('the_excerpt', 'wpautop');                                                                                                                                          
        }                                                                                                                                                                                     
      add_action( 'the_post', 'tsl_remove_autop', 1);

    but I can’t get the stray <p> tags to be removed from the events page.

    I assume it has something to do with upgrading to WordPress 6, but I also upgraded a bunch of stuff at the same time – I hadn’t noticed the problem on my dev site.

    The only way I can fix it is to modify wpautop() to return $text as soon as it starts, and that fixes it.

    The advice from the wordpress developers is that plugins shouldn’t be putting spaces and newlines into their template code…. That doesn’t really seem like a reasonable solution to me, and I don’t know if there is some conflict with another plugin or not.

    I see in your Overwrite.php that you say this->wpautop isn’t needed any more, but I wonder if it still is.

    Any suggestions on how to make your code work without disabling wpautop for everywhere?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter jondaley

    (@jondaley)

    Here is an example of what your template outputs once autop is done with it:

    <p></script></p>
    <p><script>
    ( function( $ ) {
    	$('#event_tribe_venue').on( 'blur', '.linked-post-name', function () {
    		var input = $(this);
    		var group = input.parents('tbody');</p>
    <p>		// Not actually populated with anything? Don't bother validating
    		if ( ! input.val().length ) {
    			return;
    		}</p>
    
    Thread Starter jondaley

    (@jondaley)

    Ah, I found it. It is a plugin called badgeOs that conflicts with wpautop and the-events-calendar.

    $newcontent .= $content; // wpautop( $content );
    and another place in the same file that calls autop (that one is more suspicious since the comments don’t match the code…)

    I’m not sure if your content should be able to handle having autop called on it, or if there is some way of making sure that all plugins don’t call autop on your template…

    Plugin Support Abz

    (@abzlevelup)

    Hi @jondaley,

    Thanks for reaching out to us. Appreciate you providing more information here about the issue you’re having. Good to know that you’ve been able to locate the conflicts with our Plugin.

    I would definitely ask the team in regard to this and see what’s up. I would get back to you as soon as I know more.

    Have a great day.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @jondaley,

    We are reaching out to you about this one here. We’re transitioning to releasing 6.0, which should be compatible with WP6. I’d keep you posted and notify you in this thread here.

    Have a great day.

    Best,
    Abz

    • This reply was modified 2 years, 5 months ago by Abz.
    Thread Starter jondaley

    (@jondaley)

    That would be great to have it fixed so I sent have to keep track of a local change.

    Plugin Support Abz

    (@abzlevelup)

    Hi @jondaley, yes, but since this is a plugin conflict, we suggest disabling the badgeOS plugin for now. I’d recommend you reach out to the plugin developer and check if they have any workaround for this one. We will keep you posted here on our end as well.

    Have a great day, Jon.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hey @jondaley, this thread has been inactive for a while, so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up, and we’d be happy to help.

    Cheers,
    Abz

    Thread Starter jondaley

    (@jondaley)

    As far as I know, your plugin is still incompatible with any plugin that calls autop() on your templates, so doesn’t seem “resolved” to me.

    I have modified badgeos, but like the link above, there are other plugins that has the same conflict, but at least this is documented so others can know how to work around the bug.

    Did you look into fixing it on your side?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress 6 breaks the calendar?’ is closed to new replies.