I have installed imagebrowser, patched fckeditor, and I get the Image Browser window up, but it only says:
Loading...
And my apachelog gets these error messages:
[Fri Oct 31 22:59:08 2008] [error] [client 127.0.0.1] File does not exist: /Volumes/xampp/xampp/xamppfiles/htdocs/modules, referer: http://localhost/vogol/?q=imagebrowser/view/browser&app=FCKEditor
[Fri Oct 31 22:59:08 2008] [error] [client 127.0.0.1] File does not exist: /Volumes/xampp/xampp/xamppfiles/htdocs/themes, referer: http://localhost/vogol/?q=imagebrowser/view/browser&app=FCKEditor
[Fri Oct 31 22:59:08 2008] [error] [client 127.0.0.1] File does not exist: /Volumes/xampp/xampp/xamppfiles/htdocs/sites, referer: http://localhost/vogol/?q=imagebrowser/view/browser&app=FCKEditor
[Fri Oct 31 22:59:08 2008] [error] [client 127.0.0.1] File does not exist: /Volumes/xampp/xampp/xamppfiles/htdocs/misc, referer: http://localhost/vogol/?q=imagebrowser/view/browser&app=FCKEditor
[Fri Oct 31 22:59:08 2008] [error] [client 127.0.0.1] File does not exist: /Volumes/xampp/xampp/xamppfiles/htdocs/misc, referer: http://localhost/vogol/?q=imagebrowser/view/browser&app=FCKEditor
[Fri Oct 31 22:59:08 2008] [error] [client 127.0.0.1] File does not exist: /Volumes/xampp/xampp/xamppfiles/htdocs/sites, referer: http://localhost/vogol/?q=imagebrowser/view/browser&app=FCKEditor
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | basepath_files_table_alias.patch | 5.22 KB | pkej |
| #6 | basepath_files_table.patch | 5.17 KB | pkej |
| #3 | patch.patch | 2 KB | jdelaune |
Comments
Comment #1
jdelaune commentedOk sorry about the issues, do you have clean url's enabled? It could be an issues with CVS let me download the module from here and give it a go. I'll get back to you soon :)
Comment #2
jdelaune commentedOk I can see where the issues lies.
How good are you with code? lines 137-145 contain links to files, i'm guessing you haven't installed drupal in the root directory or something? I will look into a better way of referencing the files.
Change as needed for a quick fix :)
Comment #3
jdelaune commentedHey try applying this patch to the original imagebrowser.module
Let me know if it works.
Comment #4
jdelaune commentedDo let me know if this fixed your issue. If it didn't I will look into it further :)
Comment #5
pkej commentedI haven't applied the patch yet ;) But a visual inspection of the patch looks promising. I will try to set up a test site with this tonight, when the kid has fallen asleep.
Comment #6
pkej commentedI've patched ImageBrowser with #3 and it doesn't solve all the problems. I still get "loading", but now the windows seems to find more of its elements than before, the loading has moved to the middle of the window, instead of as a list item just under the "All|mine" drop down.
I checked out your javascript and it makes the same assumption. Of course, now I should have attahced a patch file, but unfortunately I don't know how to get the basepath. Well, I think I do...you could put the basepath as a) a hidden field b) as a base path variable in the head of the form you output and then use js to get that basepath.
There might be a Drupal js function to call as well, but I didn't find any in drupal.js.
Line 311:
to:
Line 332:
to
Those two previous blocks of code are very similar, I would have refactored them out into a function, and just sent the path elements which are different into it, especially if there might be more if/else clauses in the future (for asset module, for filefield module etc).
Finally you need to change:
Line 232:
Needs to be changed to:
Line 266:
to:
The above works with table name prefix and installed in a subdirectory, there are still bugs, when clicking on an image the javascript won't update the "Insert Image" fieldgroup. I think that's because I'm using "Clean URLs" and "Auto Nodetitle", so there has to be a call to a proper function to fix that.
I'll don't know if I can make a patch, I will try, but I'm saving this so it won't get lost ;)
Comment #7
pkej commentedAnother patch, I added drupal_get_path_alias it didn't break anything which wasn't broken already, but I don't know if it does the right thing either ;)
Comment #8
pkej commentedBTW, my patches are against a clean dev version, without any patches applied before. So the patch in #7 includes #6 and #3 in the same patch.
Comment #9
jdelaune commentedCheers what I'll do is install a local copy outside the root directory for testing. I committed some new code last night which I don't think has been packaged yet, so I'll work from that and get back to you once everything is sorted.
Thanks for the patches!
Comment #10
pkej commentedBTW, I wouldn't touch the javascript, it seems I might be mistaken there, I read the:
And thought it needed the subdir I installed in infront, but now I notice that it is just using the module path, and I can't see how you find the rest of the path, thus I'm not sure where the paths are comming from, probably some of the PHP.
I should test on a webserver where I don't have a subdirectory, but all my development is done on xampp on Mac, so it is a bit of a hassle to upload unfinished stuff to a server ;)
Best regards,
Paul
Comment #11
pkej commentedThe file upload works from the ImageBrowser. Now, will you create a NodeBrowser ;)
Hmm, wonder how much work that would be if I started with the image browser?
Comment #12
pkej commentedI think we need to add the $lang variable to the drupal_get_path_alias, but that needs an optional drop down in the ImageBrowser to sort images based on language of the node they belong to. That is needed for most of the sites I use, and epsecially the one where I want to add this functionality to.
The images will in most cases have the same files though, so the file look up I've added should be okay.
Comment #13
jdelaune commentedNot sure if we need drupal_get_path_alias(); and all the calls you made to the database. I worked on a version that works without Clean URLs and within a subdirectory. As for locale support I'll look into that a bit more.
Cheers
Comment #14
pkej commentedTnx, as soon as I see a new package I'll download and test here.
Comment #15
jdelaune commentednew package is out let me know what happens. Never setup locale so I might need some guidance on what the issues are and what should happen :)
Comment #16
pkej commentedThe 6.x-dev packaged worked pretty well.
I'll file separate issues for other problems, as they arise.
Comment #17
jdelaune commentedImage nodes are 'Language neutral' so I don't see the need for a language drop-down. I fixed one issue with different locale settings. I'll commit it a bit later tonight. Like you said if you have any more issues open a new open new. Cheers.