I tried this on a clean install and it worked great, then I tried to add it to an existing site and it didn't work at all. It behaved erratically, sometimes I could get an upload window but no list of files, other times the entire WYSIWYG editor disappeared. Finally figured out the site where things are broken is using jQuery 1.7 and jQuery update. I need them because I need Modal Framework API and it requires those versions.
I don't know if supporting jQuery 1.7 is on your radar, just throwing that out there for consideration. I have no idea what problems it would create.
This is a great idea. I've been hoping someone would wrap these ideas together -- I use imagefield all the time but wanted a nice button for the insert and a nice, views-enabled list of files to select from -- exactly what you have done :) All the power of imagefield, insert, and formatters in a nice package.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | wysiwyg_imagefield_wysiwyg-mode.png | 36.88 KB | pkej |
| #14 | wysiwyg_imagefield_no-wysiwyg.png | 102.6 KB | pkej |
| #7 | jquery-ui-1.7.3.custom.zip | 782.07 KB | sinasalek |
Comments
Comment #1
decipheredI have already had a request to support the Modal Framework API, which I am happy to do as optional support. #877224: Supporting Modal Frame API
Marking this as a duplicate.
Cheers,
Deciphered.
P.s. Thanks for the nice words, I'm truly shocked at the amount of positive attention this module has received in such a short period of time.
Comment #2
karens commentedIt's actually not a duplicate, it doesn't work even in jQuery 1.7 with Modal Frame disabled. I don't really care if you use Modal Frame, I'm just reporting that it doesn't seem to work in jQuery 1.7, which others may be using (with or without Modal Frame). But if you end up supporting Modal Frame you will have to figure out why jQuery 1.7 doesn't work, so I guess that will fix my problem.
Comment #3
karens commentedActually, I'm going to reopen this because anyone using jQuery 1.7 is going to run into this problem. I've done some debugging to try to see where it is breaking and I have it narrowed down, but no solution.
The problem is something to do with displaying the view in the dialog box. If you choose any option that will display a view (i.e. if you choose to use Filefield sources and check it to 'autocomplete reference textfield' and the view IS NOT EMPTY), not only does the widget not work but the WYSIWYG editor completely disappears and all the collapsible fieldsets on the page are also broken and non-functional.
If you don't check that option, the widget and WYSIWYG both work fine (except of course that you don't see the view of available files). The widget and WYSIWYG also work fine as long as the view is empty, i.e. until you actually save a node that has a file in it). As soon as there is a file to be found and Views returns a view, all the javascript elements are broken again.
Everything also works if I comment out line 30 in filefield_sources.inc. I of course see no view of files, but everything else works fine.
Comment #4
sinasalek commented@KarenS have you tried upgrading to the latest dev snapshot of both jquery update and jquery ui? I'm using jquery ui 1.7.3 and it's working.
Comment #5
karens commentedI have jquery ui 1.7.3 with the latest official releases of jquery update and jquery ui. I didn't try the dev snapshots, but I'll give that a shot later today.
Comment #6
karens commentedNope, no luck with the dev releases either. I started all over with a fresh install and only installed the things I need to get this to work -- jquery, jquery_ui, cck, all the imagefield and filefield modules, views, and wysiwyg, plus the book module. I then added an imagefield to a book page and marked that it should be used for wysiwyg_imagefield and I set up wysiwyg with tinymce and turned that button on (I left most of the buttons off, just a couple simple ones). Then I try to add a new book page.
If I have jquery ui 1.7 installed it is broken. If I swap in jquery ui 1.6, it works.
[Edit] Just in case it is not clear, with jquery ui I also have to enable jquery_update. With jquery ui 1.6 I turn that off.
Comment #7
sinasalek commentedI had some issues with jquery ui as well, it seems that the version on googlecode is different than the one on JqueryUI's website. I'm using this, might also work for you (Attached).
Note that you should use the contents of development-bundle folder.
Hope it helps
Comment #8
sinasalek commentedThe issue is back for me as well!! maybe it's a conflict or maybe it's not but i still couldn't figure out what's causing it. Just to make sure i'm going to try it again on a fresh install.
Comment #9
karens commentedThe problem is actually jquery_update, not jquery_ui. I can swap the two versions of jquery_ui and the editor works with both, it is when I enable jquery_update, which I have to use with jquery_ui 1.7, that it becomes non-functional.
I still can't find anything that makes it work, just trying to help debug the problem.
Comment #10
decipheredHi guys,
I look forward to reading through this issue and seeing what conclusions you've made while I've been lazily sleeping (damn humanity :)).
Thanks for the great testing effort you put in.
Cheers,
Deciphered.
Comment #11
decipheredJust to be clear, the reason I marked this as a duplicate is that this issue was going to be encountered during the process of adding support for the Modal Framework API, not that I thought the issue had anything at all to do with the Modal Framework API.
The information the both of you have provided should give me a good start for my own investigation, so I thank you both for that and any more help you wish to provide.
While I wouldn't mark this issue as critical, I will make it one of my higher priorities.
Cheers,
Deciphered.
Comment #12
karens commentedI thought it might be useful to have this as a separate issue to warn anyone trying to use jQuery UI 1.7 that there are problems. Seeing a feature request for Modal Framework integration wouldn't really tell you that there is a bug using jQuery UI 1.7, even without Modal Framework.
I've done all I can do, I'm stuck now. Hopefully someone else can figure this out.
Comment #13
decipheredJust did a quick test with the following versions:
jquery_ui-6.x-1.3
jquery_update-6.x-2.0-alpha1
jQuery UI 1.7.3
jQuery Update 1.3.2
Result: Worked perfectly :)
Reality is, this is not really a cause for celebration, because at least if I had reproduced the issue you're having I may be able to resolve it. Is it possible that you can send me a makefile so I can confirm I'm working with the exact same setup as you are and then I will try again?
Cheers,
Deciphered.
Comment #14
pkej commentedKarenS, are you using the setting "Use with WYSIWYG ImageField". From your wording, I think you might, but I'm not sure.
I can also see a list of files, but only in the "Reference Existing" in the filefield, when unchecking "Use with WYSIWYG ImageField". However, I can't select any items in the table and have them selected, I have to write the name manually through the autocomplete field, and upon selecting the image the whole editor disappears from the textarea, just as KarenS describes.
If I use the Wysiwyg button, there is no list of files, just an upload field. (see the attached image). I find that not very helpful for the user.
Regardless, the list in the imagefield reference existing is not usable (the images appear below the list, there is no way of selecting them), see the second attached image for info.
I have to concur with KarenS, this module joins together a lot of nifty stuff, and it would be great to see it work properly (and hopefully Insert will get around to be able to insert nodes from nodereferences one day...)
Perhaps I should refactor out this into two UI issues in the queue?
Comment #15
henrijs.seso commentedI tracked it down to line in file wysiwyg_imagefield/plugins/wysiwyg_imagefield/wysiwyg_imagefield.js
$($('#wysiwyg_imagefield-wrapper').children().get(0)).css('display', 'none');if you comment it out, you can see all options... It does not work for me, autocomplete is missing.
my setup
jQuery UI 1.7.3
jQuery Update 1.3.2
Comment #16
ar-jan commentedThis is weird, I had the problem Karen described while using jQuery Update 1.3.2 + jQuery UI 1.7.3. So I disabled jQuery Update and switched to jQuery UI 1.6, but it I still have this problem:
- The WYSIWYG Imagefield button works with an imagefield on 'Story' using WYSIWYG 2.1 with FCKEditor 2.6.6. That is, Uploading works, not browsing existing images.
- On nodetype 'Page', I have an attachment filefield that is not configured to use Insert or WYSIWYG Imagefield. While FCKeditor works for story (which has only an imagefield), it doesn't for page: FCKeditor appears, but is non-responsive, and other fieldsets behave weird. The normal filefield widget does work.
- When I disabled "Use with WYSIWYG ImageField?" for the imagefield on story, FCKeditor broke for stories as well.
I don't have time right now to try this again on a clean install, but it appears that in some conditions this problem occurs with jQuery UI 1.6 as well.
Comment #17
henrijs.seso commentedalso this line in file wysiwyg_imagefield/modules/filefield_sources.inc causes trouble, it kills drupal core js similarly as in #806352: all collapsible fields broken
$theme_registry['filefield_source_reference_element']['function'] = 'theme_wysiwyg_imagefield_filefield_source_reference_element';Comment #18
eugenmayer commentedI have written down some modules being incomptible wit wysiwyg_imageupload ( not wysiwyg_imagefield ), but the reasons are similar. I have done quiet some work with 1.3 / 1.7, as iam running it for ~2 years with 200 modules.
Most of the issues you will run into are related to the dropped @ syntax from 1.2 -> 1.3 jquery. Those issues come up with the fieldsets, lightbox2 and some others.
But there are also some modules incompatible out of other reasons, some are even incompatible with WYSIWYG itself ( like smilie ).
Take a look at http://drupal.org/node/809612 - hopefuly it can save you some time debugging your setup. Also some common issue with closures / custom themes / caching are descibed here http://drupal.org/node/898222 .. i think it makes sense to share this knowledge :)
-
something else:
That one seems to be in odd snytax..
That should do the job perfectly:
But in case
But be carefuly, some IE versions tend to freak out using children ( run into this in the tagging module ).. so i rather use .find('> sometag').
Comment #19
lelizondo commentedsubscribing
Comment #20
murzWhat can I do with current version of modules to get work uploaded images list in image select popup?
Comment #21
fortis commenteddoesn't work if imagefield in fieldgroup