I have installed FCKeditor and it successfully allows me to add images while editing. It shows the images. However, when that content is viewed, all images are stripped out.

If I go back to edit, I can see the images fine.

It's NOT an upload problem because like I said, when I go back to edit the content the images are there and perfectly viewable.

I do not have HTML filtering on. Full HTML is selected.

I see that there are a HUGE number of people who have posted this same problem here and seem to have just given up hope. If you google you see that there are vast numbers of people who report exactly this issue.

Has anyone got a patch that will allow images to be viewed?
If the FCK edit module is broken such that this cannot be fixed, can someone please post and recommend a replacement?
FCKedit seems to be brilliant in every other way, but the img tag problem is terrible. We desperately need this fixed.

Comments

bkieser’s picture

Okay, I have FINALLY worked out the problem and the fix. I will post it here because so many people have this problem.

First of all, you need to know that if you are dealing with the ecommerce module, any settings you change are NOT show by refreshing your browser. Say you change HTML filtering and you are on a product that has a FCKedit field (e.g. description) with an image in it. Pressinng "refresh" is broken. It won't show the HTML change.

What you have to do is go into edit where you will see the image and press "submit" again, even though you have not made ANY changes to the product! Only THEN will you see the results of your settings change!

That's a biggie because you can have fixed the problem (as I did) many times (as I did) and still you will NOT see it as fixed! In fact, I wasted five hours refixing something that I had already fixed!

So, always go back to products and re-submit whenever you make any changes.

Secondly, the link to get to HTML filtering is a devil to find. Here is how you get to the setting!

administer / input formats

You expect it under "settings" or associated with "image" or "content" but it isn't.

Once you are there, you get the choice of "Filtered HTML", "PHP code" or "Full HTML".
Now here is another gotcha - you THINK that selecting the "Full HTML" will mean that content is now no longer filtered. Like the "Roles" field says: "All roles may use default format"
You are wrong!
That is misleading and should be rethought in future Drupal work.

Because... look at the "Filtered HTML" field. There you see: "anonymous user, authenticated user" in the roles field.

Now what Drupal isn't telling you is that even though you have selected "Full HTML" as the default... it is overriding this setting for anonymous and authenticated users! I.e. It is ignoring you!

I think that this crucial piece of information is why so many people fight with imgage and eventually just give up and either drop Drupal or plan their sites some other way. It is doing the power of FCKeditor a huge disservice in my opinion because FCKeditor is so very powerful and once you know how to enable its power it makes Drupal one of the most powerful content engines around.

Anyway, what you need to do is modify the "Filtered HTML" field. Drupal is ignoring your default setting. So click on "configure". You will be presented with a screen that you need to click on the "configure" tab for and then you will see a "HTML filter" option. Yes, this isn't a well thought out menu system. It needs to be reworked.

Now you have the option to "Strip disallowed tags" or "Escape all tags". Here's a trick:Set the "Escape all tags" while you are debugging your display. The reason for this is because you can now see when Drupal is "stripping" out the tags that you need AND what thos tags are! So you can come back to this page and add them to the "Allowed HTML tags" field.

Okay, add Only local images are allowed. to the "Allowed HTML tags" field. Here is what mine looks like:
Only local images are allowed.

  1. The above allows anonymous users to see inline images in FCKeditor.

    Save the configuration and test (re-submit). You should see the products there fixed.

    Once it is all fixed, then come back to this page and choose "Strip disallowed tags".
    This is so that if there ARE any stripped tags, your site's visitors don't see them. I.e. Bugs and errors are not reflected to the user.

    That's it folk! The above series of "gotchas" have caught out a LOT of people.
    Don't give up!
    The menu system for this is very difficult to work out but now that you have the solution, you will find that FCKeditor in Drupal really is the business. It rocks!

bkieser’s picture

Looks like me tags were taken and interpreted.
Ooops!

ontwerpwerk’s picture

nex time use >code<>/code< for using html and php tags to show them

ontwerpwerk’s picture

ok.. the other way arount &lt;code&gt;...&lt;/code&gt;

ontwerpwerk’s picture

Status: Active » Closed (fixed)