Get rid of empty paragraph tags in messages

Home Forums Calendar Products Community Events Get rid of empty paragraph tags in messages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #139008
    Joel
    Participant

    Hi, when I, as a user, go to edit a recurring event on the front end I see this warning message: “Warning: You are editing a recurring event. All changes will be applied to the entire series.”

    What I’m concerned about are the empty paragraph tags that show up before and after the error message. It makes for an ugly layout. Is there a way to delete these or edit the output? If so, where can you edit this output.

    Thanks!

    #139743
    Barry
    Member

    Hi – sorry for the inconvenience, here.

    Yes that’s definitely a bug and I’ll log it as something we need to address (in fact, it looks like one paragraph element is nested inside another – and the browser is doing its best to transform it into something that makes more sense – hence it may seem like there are empty paragraphs above and below).

    In the meantime, you could workaround this with a template override. Please review the Themer’s Guide for some essential background info on this process – what you’d basically need to do though is make a copy of community/modules/header-links.php and find this line of code within it:

    echo tribe_community_events_get_messages();

    Then, in your theme’s copy of the template, delete that line and replace it with:

    // Get the messages
    $messages = tribe_community_events_get_messages();
    
    // Strip the leading and trailing paragraph tags
    if ( false !== ( $leading = strpos( $messages, '<p>' ) ) )
    	$messages = substr_replace( $messages, '', $leading, 3 );
    
    if ( false !== ( $trailing = strrpos( $messages, '</p>') ) )
    	$messages = substr_replace( $messages, '', $trailing, 4 );
    
    // Show the messages
    echo $messages;

    Does that help here?

    #173916
    Leah
    Member

    Hi there,

    I just wanted to update you here. We were not able to fix this issue in time for our upcoming release (3.6). However, it is still very much a priority and we plan to work on it for a future maintenance release. We will keep you posted on our progress. Thank you for your patience and support!

    Best,
    Leah

    #188818
    Joel
    Participant

    Thanks for your help and updates. I’ve added the fix and it resolved the issue. I would appreciate an update once the bug is fixed, so I can allow your plugin to do it’s magic. Cheers!

    #190682
    Barry
    Member

    Awesome – and we’ll do our best to reopen this and post an update once we’ve got something substantive to report. Thanks again 🙂

    #988009
    Leah
    Member

    Hello,

    Thank you again for bringing this issue to our attention. We’re happy to say that we have added a fix for this into our upcoming version 3.11 release. Keep an eye on your Updates page for the new version. If you have any trouble with the update (or are still seeing this problem after you update) please start a new thread and we’d be happy to help out.

    Thank you for your patience while we got this release ready to go!

    Best,
    Leah
    and the rest of The Events Calendar team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Get rid of empty paragraph tags in messages’ is closed to new replies.