Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matthew 138 posts 201 karma points
    Apr 30, 2014 @ 21:55
    Matthew
    0

    Keeps adding extra p and br tags

    If I go into a content item and just click around on things and save and publish several times, Umbraco adds a <p><br /><br /></p> in the bodyText property, below existing content. It forces the bottom of the containing div to enlarge and looks bad. I've gone in and deleted them a number of time but they keep coming back. It usually takes more than one attempt at deleting to get rid of them, I assume because it's trying to add more while saving/publishing.

    Any ideas why this would happen and how to stop it?

  • Matthew 138 posts 201 karma points
    May 02, 2014 @ 19:08
    Matthew
    0

    Nobody else seeing this, hunh? I get it all the time, looks like this in a view source:

    <p><br /><br /></p>
    <p><br /><br /></p>
    <p><br /><br /></p>
    <p><br /><br /></p>
    

    Seems to happen regularly when I save and publish on another tab than the first, content one, but the p's and br's go into the bodyText on the first tab.

    Here's a clip of two divs side by side, the one on the left has been saved and published a couple times, the one on the right just once, and below them a clip of how it looks in dev tools.

    enter image description here

  • Matthew 138 posts 201 karma points
    May 02, 2014 @ 19:14
    Matthew
    0

    Just checked this on a different computer running a different OS and VS and w/a different package on U7.1.1, same thing, save and publish from a different tab than the first one, adds p's and br's. Going to enter a bug on it.

  • Matthew 138 posts 201 karma points
    May 05, 2014 @ 21:42
    Matthew
    0

    Here's a link to the issue tracker: issues.umbraco.org/issue/U4-4815

  • Steve Morgan 1349 posts 4459 karma points c-trib
    May 06, 2014 @ 10:58
    Steve Morgan
    0

    I can't recreate this - what does your Document Type look like.. something like that below?

    Content tab

    -bodyText - (RT Editor)

    ImagePanel1 tab

    -Image1 - (Media Picker)

    -Image1Caption - (Multiline Text)

     

    ImagePanel2 tab

    -Image2 - (Media Picker)

    -Image2Caption - (Multiline Text)

     

    You mention a Package - what do you have installed inside of Umbraco?

  • Matthew 138 posts 201 karma points
    May 10, 2014 @ 19:39
    Matthew
    0

    Hi Steve, sorry for the slow response.

    I find it even happens on a simple content page that only has a cropped image but if I click save and publish on the imagery tab, it immediately adds this: <p><br /><br /></p>, I can look at the html in the RTE and see it there.

    The package I mentioned was Kevin's LocalGov package which uses a similar doc structure but doesn't have the image stuff. I wonder if that has something to do with it...

    My doc structure looks like this:

    Root
    - Content
    -- Page
    --- Section Pages
    
    the most maxed out doctype looks like this:
    
    Content tab (from content doctype)
    - title (text string)
    - content (RTE)
    Featured tab (from Section Pages)
    - lead (limited RTE)
    - image title (text str)
    - image message (limited RTE)
    Imagery tab
    - image cropper (4 crops: full banner; medium banner; std image; portrait)
    - feature image (media picker)
    - gallery images (multiple media picker)
    Metadata tab (from content)
    - subject (text)
    - robots (text)
    
  • Matthew 138 posts 201 karma points
    May 10, 2014 @ 20:35
    Matthew
    0

    it be whack, dog:

    enter image description here

  • quincint 4 posts 23 karma points
    Jun 27, 2014 @ 19:13
    quincint
    0

    This also happens to me.

    I've tried to remove the Forced root value but it still is happing.

    ..\Umbraco_Client\Tinymce3\tiny_mce_src.js and on line 13452 change to this forced_root_block : '',

    Issue was resolved for a few days but reappeared.

  • keilo 568 posts 1023 karma points
    Jun 29, 2014 @ 09:39
    keilo
    0

    May I know which version of Umbraco are you using, having this issue?

    I too came across some inconsistencies only to realize later the tinymce is update and it does not honor all config params under tinymce.config.

    Had to manually go and edit the new referenced .JS file.

    I cant seem to find any documentation on this transition or what is expected in near-term updates.

    Perhaps you can share the version(s) you are using and we can try to figure out from there?

    cheers

  • quincint 4 posts 23 karma points
    Jun 30, 2014 @ 18:23
    quincint
    0

    I am using version 7.1.4

  • keilo 568 posts 1023 karma points
    Jul 02, 2014 @ 10:20
    keilo
    0

    I too have the 7.1.4 and can replicate this on 7.2 alpha too.

    Not sure if any of you figured a solution yet that wont break between updates. 

  • Steve Morgan 1349 posts 4459 karma points c-trib
    Jul 02, 2014 @ 12:05
    Steve Morgan
    0

    Stupid question perhaps but are you all on Windows and using Chrome because I can't recreate this - could it be environmental?

  • keilo 568 posts 1023 karma points
    Jul 02, 2014 @ 12:14
    keilo
    0

    Im on Windows 7 x64 with Chrome Version 35.0.1916.153 m

  • keilo 568 posts 1023 karma points
    Oct 15, 2014 @ 14:14
    keilo
    0

    Have any of you figured this out?

    This started happening in all pages, just after save and publish. Would be interested to hear what sort of solution did you come up with.

  • Peter S 169 posts 587 karma points
    Aug 17, 2015 @ 11:39
    Peter S
    0

    This just happened to me in version 7.1.4. Only in Chrome, thought. Works fine in IE.

  • keilo 568 posts 1023 karma points
    Aug 19, 2015 @ 22:08
    keilo
    0

    Not sure if this can be re-produced on the 7.2+

    Looks like its a Chrome-specific thing from the feedback here, but not classified as a bug in the tracker - at least I couldnt find it

    One solution would be to attach to document publish event and remove the extra

    tags but then this is really a hack-approach.

  • samay 22 posts 132 karma points
    Jan 26, 2018 @ 08:53
    samay
    0

    Still happen in V7.7.6

    sometimes happen without any change of content, just only click save and publish in some pc using IE 11. But with same test with IE 11 on another pc, it cannot repeat .

    I am so frustrated that how comes. I am using vorto combine with RTE , I am not sure is it about this.

    My user keep complaining about this, because they need to keep deleting extra p and br after each save and publish.

    Please help

  • David Gregory 87 posts 233 karma points
    Feb 22, 2018 @ 17:01
    David Gregory
    0

    This is now happening to me on 7.8.1 but for me it adds 3 p tags like this when I use the gallery macro.

    <p>Test</p>
    <p> </p>
    <p> </p>
    <p> </p>
    <div class="umb-macro-holder mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="Gallery" mediaIds="1062,1063" /> --> <ins>Macro alias: <strong>Gallery</strong></ins></div>
    

    Easily replicate by installing a fresh empty 7.8.1 create a doc type with one rte. Create and config the Gallery macro from snippet with default params etc and enable Use in rich text editor, but not render.

    Now create your new content page, put a line of text in and then the gallery below. Click save and publish a few times and you will see the Ps appear.

  • Riadul Hoque 5 posts 98 karma points
    Jun 26, 2018 @ 14:37
    Riadul Hoque
    1

    I have managed to solve this issue.

    If you go to tinyMceConfig.config, under validElements change "#p" to "-p".

    This will eliminate empty p tags.

    <validElements>
    <![CDATA -p[id|style|dir|class|align]
    

    For more reference: https://www.tinymce.com/docs/configure/content-filtering/#valid_elements

  • keilo 568 posts 1023 karma points
    Jun 27, 2018 @ 09:43
    keilo
    0

    Hi Riadul

    Thanks for sharing this. What happens when the user/editor press Enter key multiple times to leave line spacing in that case?

Please Sign in or register to post replies

Write your reply to:

Draft