The editor still removes any <div> tags and replaces them with <p> after deleting line 66.
The editor still removes any <div> tags and replaces them with <p> after deleting line 66.
2.1 had the <p> tag appearing in my <div> in the posts, but I deleted line 66 and it's looking back to normal now. Thanks for the tip.
Tried the fix on line 66 and this is what I get
Parse error: parse error, unexpected T_LNUMBER in /home/ccf/covonline.net/wp-includes/formatting.php on line 3
Unfortunately, there are quite a few other issues for me on WordPress 2.1 and I will certainly not upgrade my other blog.
My static pages have been turned into ordinary posts and placed chronologically, the p tag issue is the cherry on the cake. I have tried every suggestion on this post to fix it, but it just won't work.
I would move back to 2.07 that worked beautifully if I had access to my database.
http://blogginginparis.com
@seluna:
see my post here:
http://wordpress.org/support/topic/102799?replies=2
Thnx for the comment-line-66-tip! Works great.. But only the div tag thing is fixed, is there some other line to comment (or delete) for the p tags around the <!--more-->?
@ccf: maybe download wordpress.zip again, delete (or comment) line 66 in formatting.php that is inside that wordpress folder, than upload it to your blog. Maybe you accidently deleted something else.
I'm experiencing the same problem as samkahn.
I posted this elsewhere but it's not getting any attention. Here's what I see in the visual and code editors:
http://img265.imageshack.us/img265/6854/wpnoparadf0.gif
As you can see there are no < p > tags in the code. This is causing problems. What's going on?
The code itself won't have the paragraph tags in it, those are added after the fact, during the display of the code on the webpage.
What's in the database and what's on the write post screen is *not* the exact code that is displayed on the page.
But I feel like in 2.0x I would click "view HTML" and it would show all the paragraph code. Really, all the code. The way it is now, adding in the p tags later it's adding them all wrong and causing dozens of validation errors with stuf like <p><strong>content</p></strong>
Any idea why that would be happening? Having the ability to edit all the html was crucial in the earlier versions. Why should that change?
I actually *didn't* see all the HTML tags (2.0 and before) when I was editing in visual editor and switched to code editor. That's why I don't use visual editor any more.
My problems with DIV tags were solved by a combination of two solutions: commenting line 66 of wp-includes/formatting.php like suggested earlier in this thread, and by editing line 24 of wp-includes/js/tinymce/tiny_mce_config.php as suggested by silence226 in http://wordpress.org/support/topic/102799?replies=2 .
ah - that line 24 change fixed the problem for me, too.
Is this something that the dev team would fix in future releases if someone filed a bug?
empoor: here's a screen shot of 2.04: http://img171.imageshack.us/img171/3528/wp204vj2.gif
You can see the paragraph tags.
And for comparison again here's 2.1: http://img265.imageshack.us/img265/6854/wpnoparadf0.gif
Does anyone have any idea what to hack to show paragraph tags in code?
empoor, I did what you suggested, and unfortunately, the result is still the same. I get p tags instead of div tags.
I am ever soooo sorry I ever upgraded. I see no advantages for me in 2.1
My other blog is still in 2.07 and works beautifully. I will certainly not change anything to it.
Ella was a great singer and doesn't deserve this version of WordPress
ccf, use the fix at http://wordpress.org/support/topic/102799?replies=2 .
The magic solution, a plugin
http://www.urbangiraffe.com/plugins/disable-wpautop/
(I don't like people looking at my code and fixing it for me; I don't like computer doing it also; I found this plugin, that merely leave my code as I wrote it...)
I solved the whole p tag thing, but now I want the <!--more--> tags solved too. Does anybody know a solution for that problem?! I don't want p tags around those.
I completely agree with buskerdog - those two gifs depict what I saw, and what I see now, perfectly.
IMHO this is a ridiculous "advance". The wysiwyg editor is fine, and I use it a lot, but when I want to see the code then I WANT TO SEE THE CODE. I do not want to see part of it, leaving me to guess what the rest will be.
Or am I missing something here?
Thankfully I find some frustrated fellows like me around.
I posted this issue yesterday but with no response. I totally agree with owenkelly, while WYSIWYG is fine, the code should be INTACT whose meaning relies here. The idea behind doing some "code purification" is reasonable, but an option to disable it should also be provided always.
This issue should be "officially fixed" ASAP or WP will become more ridiculous while its reputation has fallen down a bit with the release of 2.1.
I have applied the disable wpauto plugin but this only works as a temp measure since if you try to edit the post again all of the DIV tags are replaced by P tags once again. This problem is really VERY annoying but I guess a temp measure to solve things is better than nothing. Here's hoping they issue a fix ASAP.
I have found a kind soul who made my theme 2.1 compliant, and that actually fixed all the erratic <p> instead of <div>
It means that our themes have to be compliant and that 2.1 is NOT flexible. But my pb is now solved
#3669 Missing close <p> tag in wpautop should resolve this issue in 2.1.1. I think release candidate 2.1.1-RC1 was created before this fix was added, so it is NOT in the RC.
I upgraded to 2.1.1 and it's still not working properly.
<div>
<a><img></a>
<a><img></a>
<a><img></a>
</div>
becomes
<div>
<a><img></a></p>
<p><a><img></a></p>
<p><a><img></a>
</div>is it still broken in 2.1.1?
I think it might be a slightly different bug, but 2.1.1 is certainly producing bad html for me and preventing my site from validating properly.
Yes, it IS still broken in 2.1.1.
Try creating a div element with some text inside it in the code view. Then save it. Then open it again. It will be a paragraph with some text inside it.
It did that for me anyway!
It's also troublesome for plugins like FLVPlayer that create their own divs and codes. The first time you save the entry it's fine (because it creates the code after you save) but if you go back and edit anything about the post it will lose its code when you save it again. Annoying.
Replacing TinyMCE with an alternative WYSIWYG editor seems to do the trick. There are plugins for FCKEditor and Xinha available.
WP 2.1.1 has the same flaw with <!--nextpage-->, surrounding it in <p></p> elements so that effectively nextpage doesn't work.
Bummer. Just tried in on fresh instal with default theme.
Glad other people have found similar problem.
Have posted twice before about this, guess not many people are using W.P 2.11 yet
WP 2.1.1 is broken
Admin Panel / Users / Your Profile / Use the Visual Editor when writing (untick) brings everything back to normal!
This topic has been closed to new replies.