Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
My install is Drupal 6.3 + FCKeditor 2.6.3 and 6.x 1.3 beta2 + IMCE
(I also tried 2.6.1 and 2.6.2 but it did not resolve the problem)
I am trying to add a thumbnail to my node that links to a bigger picture. I use IMCE to browse the server, select the thumbnail, and send the URL to FCKeditor. That part works.
Then I click "Link", choose the bigger picture, "send to FCKeditor", and nothing. It simply refuses to transfer the URL.
Both my 6.3 sites exhibit this problem. 5.x works fine.
Comment | File | Size | Author |
---|---|---|---|
#4 | imce_set_app.js_.patch | 1.86 KB | wwalc |
#4 | fckeditor.module.patch | 1.14 KB | wwalc |
Comments
Comment #1
ggevalt CreditAttribution: ggevalt commentedI, too, am having a similar problem. Seems that it is not connecting with image toolkit; you set the size of the image and that's it.
Anyone have any solutions to this?
gg
Comment #2
B.P.B CreditAttribution: B.P.B commentedI right click the image I want to link to and "Copy image location...", then paste.
It works around the bug, but is not a real solution of course.
Comment #3
Jorrit CreditAttribution: Jorrit commentedThe cause is quite technical: The field name of the normal link dialog is called txtUrl. The field name of the link field is txtLnkUrl and at the same time the field for the url for the image is called txtUrl. It is not possible to give separate field browser urls for the normal link dialog (which requires txtUrl) and the link tab in the image dialog (which requires txtLnkUrl).
The built-in filebrowser uses JavaScript interaction instead of html id's to fill the values. At this moment I do not see a solution unless FCKeditor or IMCE is changed.
A work around would be to close the image dialog and use the link dialog to enter a link.
Comment #4
wwalc CreditAttribution: wwalc commentedI had problems with internet connection in the middle when I was writing this, so sorry for repeating after Jorrit.
In IMCE 6.x there is a nice and easy way to open it and assign an ID of element in FCKeditor that should be updated (
?q=imce&app=FCKEditor|url@txtUrl
).Unfortunately, in FCKeditor, LinkBrowserURL is used in connection with two ID's: txtUrl and txtLnkUrl and it depends on a context which one is chosen.
When "Insert/Edit Link" button is pressed, txtUrl is used, but when one press "Image" button and click on a "Link" tab, txtLnkUrl is used instead.
We need the following (I used shortened notation just to point out what's wrong):
"Insert/Edit Link"
FCKEdior.Config['LinkBrowserURL'] = "q=imce&app=FCKEditor|url@txtUrl;"
"Image"
FCKEdior.Config['ImageBrowserURL'] = "q=imce&app=FCKEditor|url@txtUrl;"
FCKEdior.Config['LinkBrowserURL'] = "q=imce&app=FCKEditor|url@txtLnkUrl;"
There is no easy way to fix this inside of FCKeditor (apart from changing the ID's that could break lots of plugins) also I don't think there is a chance for an easy hack for it. The only workaround could be done with a special plugin for FCKeditor that would replace the original fckeditor\editor\dialog\fck_image functionality (bad idea).
There is also a second option: change IMCE code a bit to accept more than one ID, so that we could assign:
FCKEdior.Config['LinkBrowserURL'] = ?q=imce&app=FCKEditor|url@txtLnkUrl,txtUrl
(use txtLnkUrl if it is available, otherwise try another ID: txtUrl)
It seems to solve the problem described here.
I'm attaching a patch (files from both modules must be patched), please take a look at it and let me know what you think of it.
Comment #5
Jorrit CreditAttribution: Jorrit commentedAs long as you make sure that txtUrl is not being used when you give txtUrl and txtLnkUrl it's fine, because the main image url field is also called txtUrl. But from the looks of it that is the case.
Comment #6
wwalc CreditAttribution: wwalc commented@Jorrit: exactly, that's why txtLnkUrl is on the first place in the patch above and we're exiting from a loop with a break statement when fileld from given list is found.
Without break statements in IMCE code, both fields would be updated in FCKeditor.
Comment #7
wwalc CreditAttribution: wwalc commented#298640: Insert/edit image: clicking browse server on link tab modifies wrong text field marked as duplicate.
Comment #8
wwalc CreditAttribution: wwalc commentedAdded feature request to IMCE tracker: #301082: Support passing more than one ID in url@.
Comment #9
wwalc CreditAttribution: wwalc commented#315241: IMCE integration bug marked as duplicate.
Comment #10
wwalc CreditAttribution: wwalc commentedComment #11
ufku CreditAttribution: ufku commentedThis is done on IMCE 6.x branch.
Sorry for the late patch.
#301082: Support passing more than one ID in url@
Comment #12
wwalc CreditAttribution: wwalc commentedAwesome, thanks!
I'll correct the FCKeditor module as soon as the new IMCE module will be available for download (I cannot commit it sooner because earlier version of the IMCE module will not recognize the new format).
Comment #13
ozish CreditAttribution: ozish commentedSubscribing. Thanks to you guys for these modules. Could you please specify which versions to use when this issue is fixed? I am assuming that it will be:
Drupal 6.10
FCKeditor 2.6.4 with 6.x-1.4
IMCE 6.x-1.2
Is that right?
Thanks.
Comment #14
FiNeX CreditAttribution: FiNeX commentedI hope the patch will be applied soon :-)
Comment #15
wwalc CreditAttribution: wwalc commentedFixed in CVS.
Comment #16
FiNeX CreditAttribution: FiNeX commentedMany thanks!