Message & Announcement Formatting issue discovered


Home Forums Front End PM PRO Message & Announcement Formatting issue discovered

This topic is: Resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #13333
    STEVE
    Participant

    Hi,

    I have the latest version of Front End PM PRO installed. I have discovered that when I type a message or announcement, even if the text area field is on the “Visual” tab, and you include carriage returns for new paragraphs or lines, but you don’t use any of the formatting buttons to style any of the text, the resulting message or announcement will be formatted as plain text with the carriage returns stripped out.

    I confirmed that if I do use any of the buttons to style the text in any way, the resulting message or announcement will include the carriage returns (newlines, paragraphs).

    This is very inconvenient and doesn’t seem like the way you would have intended for it to work, therefore I believe I discovered a bug.

    Any way you can fix this?

    Thanks

    #13339
    Shamim Hasan
    Keymaster

    I can not reproduce this.
    Please give me screenshot of your editor with message/announcement and resulting message/announcement after send. So that i can see what is changed and try to reproduce.

    #13342
    STEVE
    Participant

    Now that I did these screenshots for you, I realized I was not 100% correct in my interpretation of the problem. As you will see in Screenshot 4, the HTML formatting is present, but the newlines are still being stripped out. Hmmm? So weird.

    Let me know what you can do to help. Thanks!

    Attachments:
    You must be logged in to view attached files.
    #13349
    Shamim Hasan
    Keymaster

    You were correct in interpretation of the problem. I also did the same but could not reproduce this. in screenshot-2 your line breaks are stripped out but in my test i cannot reproduce this. This means may be some plugin and/or theme code is changing its behavior. Can you please disable all plugins except this and change theme to default theme and test?

    #13502
    STEVE
    Participant

    Hi @shamim,

    I did the plugin/theme conflict test as you suggested and was not able to resolve the issue. This gave me the idea to test another way. I opened an existing message via the UM/Front End PM Pro integration…
    mysite-dot-com/profile/user.name/?fepaction=viewmessage&fep_id=1295&profiletab=fep-um
    and then opened the same message, but this time bypassing the integration using a direct link to the message on a messages page I setup with the [front-end-pm] shortcode. This is that link…
    mysite-dot-com/messages/?fepaction=viewmessage&fep_id=1295

    The result of this test shows that messages on the page that bypasses the UM/Front End PM Pro integration and uses the [front-end-pm] shortcode to display messages, does in fact display the messages as they were intended to be displayed with the carriage returns creating new paragraphs. To try to understand why it works on this “Messages” page and not the “Profile” page, I did some investigating.

    On the page that utilizes the UM/Front End PM Pro integration, the profile page, when I inspect the code in the web browser, I noticed that the message content is not wrapped in HTML <P> tags.

    However, when I inspect the code for the same message on the messages page, not using the UM/Front End PM Pro integration, the message content is wrapped in HTML <P> tags appropriately at each carriage return.

    Can you please have a look into this to help understand what could be causing this?

    If you would like a temporary login to my site for you to see the actual URLs mentioned above, please let me know and I will get that to you right away.

    Thank you

    #13521
    Shamim Hasan
    Keymaster

    Thank you for your details reply.
    I setup my test website with UM integration and can reproduce this.
    I will investigate this and try to find out what causes this and get back to you.

    #13529
    STEVE
    Participant

    My pleasure. Thanks for your help! I look forward to your reply.

    #13532
    Shamim Hasan
    Keymaster

    I found the issue. UM remove wpautop function hook from content in its page.
    You can bypass this using following code ( I may include this code in next version of UM integration extension)

    add_action( 'template_redirect', function(){
    	if ( is_ultimatemember() && isset( $_GET['profiletab'] ) && 'fep-um' == $_GET['profiletab'] ) {
    		add_filter( 'the_content', 'wpautop' );
    	}
    }, 15);
    

    Let me know.

    #13536
    STEVE
    Participant

    That code worked!

    Thanks!

Viewing 9 posts - 1 through 9 (of 9 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.