Project:Frequently Asked Questions
Version:6.x-1.6
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If I'm adding faq content the question entered is put between a

at the beginning and a

at the end. This is already whith the preview of the question and answer, on the faq page itself and also on the FAQ blocks. The answer itself is OK. I did not configure something special about filtering, everything is standard.

I do not think it has to do with the tinymce editor being used as other content is created correctly.

Comments

#1

Status:active» postponed (maintainer needs more info)

I'm not sure what the issue is. Is it that the question is put between paragraph tags when you think it shouldn't? Or that the start paragraph tag is lower case, while the closing one is in upper case?

What are your faq settings? I especially need to know your question and category layout settings.

Cheers,
Stella

#2

Stella, I haven't checked, but my guess is that there is a check_markup involved. It will call the appropriate filters. If this includes the "line break converter" (as it usually does), then you will get paragraph tags. This is normal behavior. If the user doesn't want that, then they need to create a new input format that is assigned to FAQs and leave out the line break converter. IMHO, this is a "by design."

#3

there seems to be some interpretion about the problem, so I will provide more or better information. If I add faq content and just type "Question" (without the quotation marks, no line breaks, nothing else) into the question text box (tinymce), the FAQ will later display with html tags as text before and after "Question" (without the quotation marks). The input format is "filtered html", unchanged from the default configuration.

I hope the problem gets clearer now...

#4

It might be clearer if you escaped the html tags you use in your issue description!

It might also help if you gave me your faq settings which I've already asked for. I presume that this is appearing on the "faq" page and not on the faq node page?

Cheers,
Stella

#5

Hi Stella,

I don't know if there is a file with the faq configuration so I try to describe it:

The settings of the faq module are:
- Questions: questions inline, nothing else activated
- Categories: not activated, the radio button is on categories inline, nothing else activated

When I create content of the type faq and enter 'question' in the question text box, the result in the faq displayed will be <p>question</p>

The tags appear as text on everything that has to do with FAQs: the faq page, the FAQ block and each faq node itself. I have appended screenshots, they are in german mainly but you will see it anyway.

Thanks and regards,
Frank

AttachmentSize
Screenshot.pdf 123 KB

#6

Status:postponed (maintainer needs more info)» active

Thanks for the screenshot, that really helped me understand the issue. However, I can't seem to be able to reproduce it... this is kinda a strange one...

NancyDru: by any chance can you reproduce it?

Cheers,
Stella

#7

No, it still doesn't do that for me, even changing all my settings.

This is almost certainly a filter problem.

@rastatt: Can you tell us which filter modules you're using, please?

#8

I append a hardcopy for my (in my opinion) unchanged 'Filtered HTML' settings to avoid translating problems. The problem/bug is the same if I use 'Full HTML'.

AttachmentSize
Hardcopy_FilteredHTML.pdf 108.86 KB

#9

...I also updated from TinyMCE 3.0.7 to 3.0.8 but it didn't change anything...

#10

If you disable tinymce does it work?

#11

I think this might be a tinymce issue actually. When I played around with it before and then disabled it, I had lots of paragraph and other html tags that weren't in the input before, so you should definitely try disabling it and re-saving the node. iirc you can disable it for certain input fields too, can't you? If so, that might be the way to go.

Cheers,
Stella

#12

If I disable TinyMCE and enter faq content, there is no more <p> and </p>. Disabling TinaMCE allowed my also to remove <p> and </p> from previously created faq content.

TinyMCE so far had been enabled for node/*, user/* and comment/* only , but it appeared on faq content anyway...

#13

Category:bug report» support request
Status:active» fixed

While faq content has a content type of "faq", the url to an individual faq item is still "node/xxx". This is the same for all content types - page, story, blog, image, etc. That's why the TinyMCE was appearing.

I'm marking this as fixed since we now know the source of the problem was tinyMCE. tinyMCE should not be enabled for the faq question text as this is also the page title and should not contain html. The question text is a textarea rather than just a normal text input file so as to allow longer questions. TinyMCE attaches itself to textareas (bad design IMHO). Perhaps the tinyMCE maintainers could tell you know to disable it for a particular content type.

Cheers,
Stella

#14

See http://drupal.org/node/179462 for more information on how to disable a textarea from having tinyMCE attached. The id of the question textarea is "edit-title".

Cheers,
Stella

#15

#16

Following the instructions on http://drupal.org/node/179462 I added

    case 'title': // TinyMCE question box for FAQ module

to the switch ($textarea_name) section. It works on the 'name' not the 'id' as you might expect.
(watch out for typos is the instructions)

It works for me, tinymce editor does not appear on the question box.

I just noticed that this thread refers to D6, I applied this to D5 but I doubt that it will matter.

#17

Disabling TinyMCE to get rid of the p-tags for me is nothing but a workaround. There are good reasons to have rich-text questions...

I'm not an expert, is it so difficult to find out where the p-tags come from?

#18

I'm sure it wouldn't be for the owner of TinyMCE, to whom that question should be posed. This is not really an FAQ problem.

#19

I do not want to get rid of the work, but I'm not the expert to solve this issue (I do not know PHP nor do I know how the FAQ module or the tinymce (or even the tinymce integration module?) works or how they work together). What's still to be remembered is that the error is only with FAQ together with TinyMCE.

In my eyes, if the problem is reproducable, the only way to solve the problem is that a FAQ specialist (or developer) will talk to a tinymce specialist.

#20

It happens to the faq nodes and not other nodes because the faq titles/questions input box is a textarea and not a textfield. This is so faq can accommodate longer question texts.

The p-tags come from TinyMCE. TinyMCE attaches itself to all textareas. You can prevent it from attaching to certain textareas using the method already mentioned above, i.e.

Following the instructions on http://drupal.org/node/179462 I added
case 'title': // TinyMCE question box for FAQ module

Hutch has already confirms this works.

This is the only known method to prevent TinyMCE from attaching itself to the question input box. Any change to do this automatically by the faq module will first require a change to the TinyMCE module. NancyDru has already opened an issue on this which she mentioned above: http://drupal.org/node/235598

In my eyes, we've provided you with a solution to disable TinyMCE for this one input field, it has been tested and feedback has been received that it works. We have opened an issue in the TinyMCE issue queue to see if we can find an alternative method. There is nothing more that we can do at this point.

Stella

#21

Indeed, that issue has been open for almost two months now with no response from the TinyMCE developer. Perhaps you can get that person to actually join a dialog. I know for a fact that our modules are not the only ones affected by this.

#22

I tried to disable TinyMCE for the question input box but the description is a little too short for me (maybe the function theme_tinymce_theme copied from tinymce.module and renamed has put into the wrong place withing template.php (I uploaded my current template.php)?).

AttachmentSize
template.php_.txt 4.58 KB

#23

There is nothing wrong with function phptemplate_tinymce_theme() in your template.php
I don't know what else to suggest.....

#24

May there be a difference because of drupal 6 I use?

#25

rastatt: perhaps but I can't help you there, it'd be a good idea for you to ask the tinyMCE maintainers.

Cheers,
Stella

#26

Due to the trouble with tinymce I tested the latest FCKeditor 2.6 with the FCKeditor Module V6.x-1.2-1 and the problem is the same there. So I still ask myself where the root cause is...

#27

From a few issues I've looked at, I believe the same technique has to be used for FCKEditor. I'm assuming there is some underlying common code that is causing this. I have no idea what or where though.

#28

All I can say is that it's not caused by the FAQ module.

#29

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#30

I've added documentation on this here: http://drupal.org/node/294708

nobody click here