This is a long-awaited module, but does not seem to be working if one does not allow at least one of custom alt or custom title for an imagefield: both alt and title will be empty, zero, NULL (or something that evaluates to FALSE) at filefield_insert.js:53-54, so filefield_insert.js:93 will be FALSE, thus it does not find the imagefield's images. It does not help if I set a default alt or default title, only the custom ones will do.
Any chance to remove that dependency on custom alt and/or custom title when dealing with imagefields?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | filefield_insert_imageonly.patch | 1.97 KB | quicksketch |
Comments
Comment #1
jurgenhaasSame here, it doesn't insert anything although I had both Alt- and title-text enabled.
Comment #2
boobaa@jurgenhass: Do you have them enabled and have some default text, or enabled the custom alt and/or titles as well?
Comment #3
jurgenhaasI have them both enabled and have some replacement patterns in both of them. For the image itself I then modify the default text manually and still don't get anything in the textarea.
I'm using the latest builds for Drupal and all modules. I'm using FCKEditor and all in a German environment - if that matters.
Comment #4
quicksketchThe problem isn't the JavaScript code, it's that the fileImage template doesn't exist if a FileField isn't added to the node form. If there's both a FileField and an ImageField on the form, then it should work without an alt or title field. Of course this isn't intentional, it should work without having a FileField on the form.
Comment #5
quicksketchOkay, turns out the problem was in JS code. Or at least it was the easiest place to fix. I've committed the attached patch and the new dev release should be rolled tonight that includes the fix.
Comment #6
jurgenhaasApplied the patch and got it to work. But only in plain text textareas, not in FCKEditor textareas. I have not applied the patch from http://drupal.org/node/445878 but I thought it should default to edit-body field in FCKEditor fields even if that patch wasn't installed.
Comment #7
quicksketchjurgenhaas: Please open a separate issue.