[resolved] Wrong tab content display

Home Page Forums WooCommerce Custom Tabs [resolved] Wrong tab content display

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

    Posts

  • #424

    Grzegorz

    Participant

    Hi there!
    The plugin adds unnecessary line breaks in the whole tab content.
    I used the ‘wct_woocommerce_tab_content’ filter to figure out why, and it looks like the $field_object['value'] in line 232 of woocommerce-custom-tabs.php (v. 1.0.5) has got unnecessary <br/> tags.
    My guess is that the Wysiwyg Editor is storing the content wrong.

    #428

    WebshopLogic

    Keymaster

    Hi Grzegorz,

    I can not reproduce unnecessary <br/> tags, but I have experienced similar things earlier in case of normal posts in WordPress. Yes, we suppose this might have been caused by the standard wysiwyg editor of WordPress.
    The unnecessary <br/> tag is not inserted directly by our plugin.

    Maybe we can make an option to turn off using of wysiwyg editor. Would you like this?

    One more idea: You can try to add these lines to your functions.php file in your active theme’s directory to switch off automatic handling of paragraphs and line breaks in WP wysiwyg editor:
    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    If you still have any question, or we can do anything about this topic do not hesitate to contact us.

    Regards,
    Peter Rath
    WebshopLogic

    #437

    Grzegorz

    Participant

    I think that the solution of doing

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    is not a good idea as my other WYSIWYG editors are providing clear data.

    I think the problem is in the moment of saving form data, but I’m not sure. I’ll check in monday if the records saved in DB includes the unnecessary <br /> tags

    #443

    WebshopLogic

    Keymaster

    Hi Grzegorz,

    I can reproduce and solve the problem.
    The fix is available in v1.0.6, we have just issued.
    (version can be download in My Account menu.)

    Thank you very much to let me know about this.
    If you still have any question, do not hesitate to contact us.

    Best Regards,
    Peter Rath
    WebshopLogic

    #448

    Grzegorz

    Participant

    Thanks a lot!
    Out of curiosity: what was causing the issue?

    #459

    WebshopLogic

    Keymaster

    We use acf-wordpress-wysiwyg-field “sub-plugin”.
    There is a get_field function that returns field content from DB. This function has the format_value parameter witch controls whether or not to format the value loaded from the db.
    Although the default value is false, but it has to be set false directly to disable formatting.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.