The title says it all. When I switch to filtered html, all p tags disappear and I have an article one line long.

If I insert newlines into an article already using filtered html, the p tags stay there until the next time the article is opened for editing. Then they disappear.

I am wondering why no one has reported such a big bug previously?

Comments

tgf’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev

I'm having the same problem with dev from Dec 20 and have updated the version for this issue.

Toggling from "Filtered HTML" to "Full/Plain" and then back to "Filtered HTML" wipes out all p tags as does editing something previously saved as "Filtered HTML".

dczepierga’s picture

Status: Active » Fixed
Issue tags: +D7, +#d7ux, +ckeditor-7.x

Fixed in CVS.

Please check the latest dev release and let me know if you notice any poblems with it. Remember to clear Drupal cache and browsers cache before testing.

tgf’s picture

Status: Fixed » Needs work

I have installed the Dec 29 dev release and D7 RC3. Part of the problem is fixed as switching between Filtered HTML and other options no longer wipes out the p tags.

However, it did not seem to fix the issue of the p tags being wiped when opening a page for editing. I tried Firefox 3.6, IE 7/8 and can reproduce with:

1. Create a new page
2. Add multiple paragraphs
3. Save page and view page to see multiple paragraphs
4. Edit the page
5. Editor has removed p tags from the content
6. Saving again will "flatten" the content.

I have no caching and no aggregation of JS/CSS. Have cleared all caches.

I'm also seeing the following in the error console:

Error: r is null
Source File: http://testsrv/drupal7rc3/sites/all/modules/ckeditor/ckeditor/ckeditor/c...
Line: 124

dczepierga’s picture

It depends on filters from Filtered HTML text format. As default Filtered HTML had allowed HTML tags:

<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>

If u add in configuration of Text format tag "p" it solved this problem.

By security reason CKEditor by default filter content with filters from selected input format, u can also disable this function in settings of your profile.

tgf’s picture

I have added p as an allowed tag in the "Filtered HTML" text format and it does in fact solve the problem.

I was also misunderstanding how the "Convert line breaks into HTML" filter actually worked. I thought it would actual save the "p" tags in the content, but it is a rendering thing.

Thank you for identifying this as a configuration issue.

Would it be possible to mention this change somewhere on the configuration page? I would imagine "p" tags would be fairly common for anyone using a gui editor, even with "Filtered HTML".

rhouse’s picture

I was under the impression that input filters were supposed to be applied only to rendered output and never to the user's actual input text? I am sure I have read that somewhere in the Drupal docs.

If the problem is that tags entered might be acted upon in the gui display of ckeditor, then the filter needs to be applied in between the entered text and the display somehow. That sounds like a difficult thing to do. Surely there must be some experts somewhere who have already addressed this question?

CodyG’s picture

fck editor had the same problems with editing existing text. It was such a nightmare to configure particularly if added later.
I gave it up.
I'm now testing out d7 and thought it would be nice to have an editor... but sad to see the editing problems still exists.

dczepierga’s picture

Status: Needs work » Closed (fixed)

This bug was fixed long time ago so now it shouldn't happend again in the last versions of CKEditor module.

Greetings

jeramy’s picture

Version: 7.x-1.x-dev » 7.x-1.6
Status: Closed (fixed) » Active

I am still seeing this issue today using CKEditor 7.x-1.6

Full HTML works as expected.
Switching to Filtered HTML removes all of the <p> tags.
Adding <p> to the "Allowed HTML tags" does work around the issue.

sgb9809’s picture

I am having this issue as well.

Can be reproduced on clean Drupal install 7.10, with either WYSIWYG 7.x-2.1 or 7.x-2.x-dev (just updated a few days ago) and CKEditor 3.6.2. Filtered HTML wipes all

tags. Full HTML works as expected.

What is bizarre is that I had another site which I started last week with this exact same configuration and everything was working just fine until yesterday. I went to edit a node and all the sudden all

tags gone. I thought perhaps something was conflicting so I tried a clean install, but alas I had the same problems. Not sure why it was working in the first place...

dczepierga’s picture

Status: Active » Postponed (maintainer needs more info)

@sgb9809, try to disable option to drupal text processing (markup) which u can find in CKEditor profile -> Security section.
This will be changed with next CKEditor module release, so then it shoudn't make so much problems.

Greetings