WordPress.org

Support

Support » How-To and Troubleshooting » How come I never get an answer about WP’s awful editor?

How come I never get an answer about WP’s awful editor?

  • William Bowles
    Participant

    @creative-i

    I’ve left this before and NEVER get a response, so what’s the point?

    Every time I post a new piece it ends up with a sh*tload of these at the end of the doc? These from the latest. They’re not in the original doc so I assume WP in its ‘wisdom’ thinks I need them.

    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>

Viewing 15 replies - 1 through 15 (of 65 total)
  • Chris_K
    Member

    @handysolo

    I’ve been working with WordPress for 5 years now and I’ve never seen that.

    Are you writing your posts in some other editor and then pasting them into the WP post editor? If so, what editor — and what happens if you delete all the blank space at the bottom of your draft before pasting it in?

    William Bowles
    Participant

    @creative-i

    Hi Chris,
    Couldn’t login into the Forum until just now, no idea why.

    Ok, I post to Creative-i in a number of ways:

    1. Marsedit
    2. Vodpod
    3. The WP editor directly.

    The dreaded <p><br class=”spacer_” /></p> gets added AFTER publishing/editing regardless of the source and what’s worse there’s nothing consistent about it. Sometimes it doesn’t get added and sometimes it does. Sometimes it’s just one but more likely it’s in multiples.

    And yes, I always make sure the text is ‘clean’ before uploading or publishing. It’s only been happening since 2.9x. I now always view the post in WSIWYG and source but it’s a drag as it triples the time involved in publishing as I have to check again and again to make sure it hasn’t crept in again.

    BTW, I’m running on OSX 10.5.8 and using Firefox 3.5.7

    I can get the Server profile if you need it.

    Bill

    Chris_K
    Member

    @handysolo

    OK, if it gets added after publishing then I’d wonder about plugins. Are you running any translation plugins by chance? I did a google search on br class=”spacer” and found some links that might be relevant.

    So that’s where I’d start — disable plugins and do some testing by enabling them one by one while creating test posts after each enable. Tedious, I know, but that may be the best way to narrow it down.

    William Bowles
    Participant

    @creative-i

    Hi Chris,
    Yes, two, but one (Convey it) has been running pretty much ever since I launched Creative-i in 2008 without any problems. The other, the Google Widget has been installed for about 3 months.

    Tedious is not the word I’d use, but yes I’ll have to bite the bullet…

    Thanks

    Bill

    http://www.creative-i.info

    schmitty23
    Member

    @schmitty23

    I have the same issue. I don’t use any translator plugins. I do use the TinyMCE Advanced editor. Same thing seems to happen to me … I edit a page in wysiwyg mode and those damn spacers get added.

    I really wish WP would fix the editor to make it not mess with certain things like this, line breaks, etc.

    I have the same issue, I did some searching and some info suggests a conflict with tinyMCE advanced, although I already have ticked the setting that supposedly stops removing the <p> and br/ tags.

    The issues only occurs intermittantly which is really frustrating.

    Hey guys, i got the same problem. The Problem is TinyMCE Advanced Module and it occurs when you enable this option in the settings of the TinyMCE Advanced Module:
    Stop removing the < p > and < / br > tags when saving and show them in the HTML editor
    Disable this, and it no longer will generate the strange
    <p><br class=”spacer_” /></p> Lines.
    I guess its a bug and need to be fixed.
    Hope this helps, it worked for me.

    William Bowles
    Participant

    @creative-i

    I’ll try it but for me it creates another problem namely I need the </p><p>s when I copy some posts in source mode to another site, meaning I have to put the damn things back in!

    Bill

    RipRapRob
    Member

    @ripraprob

    Thanks for this – I had the same problem, and it was driving me nuts.

    To me it looks like a silly bug, either in TinyMCE Advanced or the way it intergrates with WordPress.

    Instead of “Stop removing the < p > and < / br > tags when saving” it should have a “Stop adding < p > and < / br > tags when viewing”.

    Anyhow; Thanks again 🙂

    I too have this problem and it’s a huge problem. My clients don’t understand anything when this stuff happens. Of course not – it shouldn’t happen.

    This needs to be fixed ASAP. It has been overlooked for years.

    Eivind

    @eivindfs

    can you give the link ?

    FalconsFan
    Member

    @falconsfan

    I’m having the same problem but I believe I found a work around. I don’t know what all this will affect but it does appear to resolve the problem.

    I’ve edited plugins/tinymce-advanced/js/tadv_replace.js as by commenting out the following lines (basically any reference to paragraph tags) :

    pre_format : function(c) {
    
    		c = c.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
    			a = a.replace(/<br ?\/?>[\r\n]*/g, '\n');
    			return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n');
            });
    
    		/*
    		c = c.replace(/<p>(\s|<br ?\/?>|\u00a0)*<\/p>/g, '<p><br class="spacer_" /></p>'); // keep empty paragraphs...
    		*/
            c = c.replace(/\[\/sourcecode\]\s*<br \/>\s*<br \/>/g, '[/sourcecode]\n');
    		/*
    		c = c.replace(/<p( [^>]*)?>/g, '\n<p$1>');
    		c = c.replace(/<\/p>/g, '</p>\n');
    		c = c.replace(/<\/p>\s*<p/g, '</p>\n\n<p');
    		*/
    		c = c.replace(/<((blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6])[^>]*)>\s*<p/g, '<$1><p');
    		c = c.replace(/<\/p>\s*<\/(blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6])>/g, '</p></$1>');
    		c = c.replace(/<br ?\/?>[\r\n]*/g, '<br />\n');
    		c = c.replace(/<li([^>]*)>/g, '\t<li$1>');
    		c = c.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n');
    		c = c.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption');
    
    		c = c.replace(/<object[\s\S]+?<\/object>/g, function(a) {
    			return a.replace(/[\r\n]*/g, '');
            });
    
    		return tinymce.trim(c);
    	},

    FalconsFan
    Member

    @falconsfan

    Sorry folks, I thought that resolved the issue but I just noticed that it is still doing it.

    Everytime I save the page it adds a new <p></p>, very irritating.

    FalconsFan
    Member

    @falconsfan

    I just noticed that if I have an image or text that is not wrapped in in a paragraph tag, that is when it continually inserts the unwanted tags.

    The page that I noticed this happening on had text inside a table cell but was not using paragraph tags, when I put the text inside p and /p tags the issue went away.

    William Bowles
    Participant

    @creative-i

    I think it has something to do when you have <div> tags and <span> tags in the same doc, something that’s not always under your control. It seems that WP (in it’s wisdom or is it Tinymce?) decides that you don’t really want a space between lines so it just knocks it out, the opposite of the original problem.

    The WP editor works fine if it’s just text and few links, anything else seems to throw it for a loop. It’s frustrating and so basic to blogging that I can’t understand why it’s such a longstanding issue.

    Bill

Viewing 15 replies - 1 through 15 (of 65 total)
  • The topic ‘How come I never get an answer about WP’s awful editor?’ is closed to new replies.