WordPress.org

Ready to get started?Download WordPress

Forums

DIV and Paragraph beheaver in 2.1 (76 posts)

  1. samkahn
    Member
    Posted 7 years ago #

    The editor still removes any <div> tags and replaces them with <p> after deleting line 66.

  2. seluna
    Member
    Posted 7 years ago #

    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.

  3. ccf
    Member
    Posted 7 years ago #

    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

  4. silence226
    Member
    Posted 7 years ago #

  5. empoor
    Member
    Posted 7 years ago #

    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.

  6. avocado
    Member
    Posted 7 years ago #

    I'm experiencing the same problem as samkahn.

  7. buskerdog
    Member
    Posted 7 years ago #

    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?

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  9. buskerdog
    Member
    Posted 7 years ago #

    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?

  10. empoor
    Member
    Posted 7 years ago #

    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.

  11. samkahn
    Member
    Posted 7 years ago #

    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 .

  12. avocado
    Member
    Posted 7 years ago #

    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?

  13. buskerdog
    Member
    Posted 7 years ago #

    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?

  14. ccf
    Member
    Posted 7 years ago #

    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

  15. samkahn
    Member
    Posted 7 years ago #

  16. baruchel
    Member
    Posted 7 years ago #

    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...)

  17. empoor
    Member
    Posted 7 years ago #

    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.

  18. owenkelly
    Member
    Posted 7 years ago #

    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?

  19. starr
    Member
    Posted 7 years ago #

    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.

  20. posiesplace
    Member
    Posted 7 years ago #

    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.

  21. ccf
    Member
    Posted 7 years ago #

    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

  22. foolswisdom
    Moderator
    Posted 7 years ago #

    #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.

  23. HarryRAR
    Member
    Posted 7 years ago #

    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>
  24. dbasulto
    Member
    Posted 7 years ago #

    is it still broken in 2.1.1?

  25. HarryRAR
    Member
    Posted 7 years ago #

    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.

  26. owenkelly
    Member
    Posted 7 years ago #

    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!

  27. buskerdog
    Member
    Posted 7 years ago #

    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.

  28. avocado
    Member
    Posted 7 years ago #

    Replacing TinyMCE with an alternative WYSIWYG editor seems to do the trick. There are plugins for FCKEditor and Xinha available.

  29. richarduk
    Member
    Posted 7 years ago #

    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

  30. richarduk
    Member
    Posted 7 years ago #

    Admin Panel / Users / Your Profile / Use the Visual Editor when writing (untick) brings everything back to normal!

Topic Closed

This topic has been closed to new replies.

About this Topic