3

Drupal6: I have a custom content type, with a custom field, set to textarea. The content type's instance filter is set to Full HTML.

When I add an image tag to the custom field, the image renders in the WYSIWIG in edit mode. When I save the node, the tag doesn't show up at all. When I view source, the tag simply isn't there.

I returned immediately out of my module's hook_nodeapi, and disabled all custom filters in the full html input format, to no avail.

If I put the same image tag in the body field of this content type, the image renders when viewing the node. Any ideas?

4
  • For the life of me I can't figure this out. I tried removing all the filters from Full HTML input format, but no dice. I suspect the filter because it only happens when viewing but that's not it. Can anyone else think of why image tags are getting stripped from my custom fields?
    – Aaron
    Sep 23 '11 at 19:16
  • Have you tried creating a custom input format just to see what happens? We often create custom input formats per role on the sites we build. Jan 14 '12 at 8:12
  • If you edit the content again is the image still there on the edit page, or has it been stripped out of there too?
    – rooby
    Apr 21 '13 at 4:57
  • Have you checked the WYSIWYG settings on path ''admin/config/content/wysiwyg/profile/filtered_html/edit''
    – user33576
    Sep 23 '14 at 3:23
0

A custom field doesn't have the same attributes as the standard body area.

Another approach would be to add a second field for the image and separate the two types at the content entry stage. You can combine them using Views. You could hide the first field and then rewrite the second field to display them together. A possible problem here is that the image will appear at the beginning or end of the copy -- float the image to have the text wrap around it -- but you won't have an option to place anywhere else.

1
  • > A custom field doesn't have the same attributes as the standard body area. How is this relevant? I should still be able to put a <img> tag in a field, if it's full html.
    – Aaron
    Sep 16 '11 at 18:34
0
  1. if the image tag not printing, you may have a filter problem. try to build a custom filter to check if it works.

  2. Try fetching the path directly. Do you get an image?

  3. Look at your server's error logs.

However, manually fetching that URL causes your Web server to throw a 500 error (internal server error).

This is not a Drupal problem. It is a problem with your Web server configuration; check its error logs.

and as a mention:

what kind of WYSIWIG do you use? it might be the WYSIWIG configuration, check it. also if your site is online browse to admin/settings/file-system and set your FILE SYSTEM PATH, and TEMPORARY DIRECTORY, see if it helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.