I'm not sure if I should have posted this issue in the CDN project, FileField Sources or IMCE project.
I'm currently using FileField Sources with IMCE. I have it setup so I can upload new images or browse my server for existing images. After installing the CDN module, I am no longer able to browse for existing images. If I browse, it shows the file names, but when I click them I don't get a preview. If I select one of the images and click insert, I get an error "The selected file could not be used because the file does not exist in the database."
I am still able to upload new images and everything works fine.
Any help would be appreciated. Thanks!
### UPDATE ###
The functionality of IMCE seems to work fine. After using inspector, I realized that the image files that wont preview have an invalid src property in the <img>
tag.
It seems as though this is only a problem when utilizing the "far future expiration" setting.
Comment | File | Size | Author |
---|---|---|---|
#7 | IMCEandCDN-1702874-7.patch | 5.67 KB | bloomt |
#5 | imce.patch | 5.68 KB | lorenzods |
#4 | imce.patch | 5.68 KB | lorenzods |
Comments
Comment #0.0
bmblack CreditAttribution: bmblack commentedUPDATE
Comment #1
Wim LeersIMCE should use
hook_cdn_blacklist()
to blacklist its JS files: http://drupalcode.org/project/cdn.git/blob/0f19fca6c4c382cdd751ac97346c0....If not, then it should work around the cross-origin domain policy.
Comment #2
Wim LeersMoving to IMCE issue queue.
Comment #3
dazz CreditAttribution: dazz commentedI added these paths to the blacklist but it doesn't seem to fix it.
Comment #4
lorenzods CreditAttribution: lorenzods commentedThis patch works on branch 7.x-1.x-dev (for CDN far future compatibility)
Comment #5
lorenzods CreditAttribution: lorenzods commentedThis patch fixes CDN interaction with far future option enabled.
Comment #5.0
lorenzods CreditAttribution: lorenzods commentedupdate
Comment #6
bloomt CreditAttribution: bloomt commentedCan someone help me with this issue? The patch does not apply cleanly for me.
Comment #7
bloomt CreditAttribution: bloomt commentedI updated the patch so that it will apply cleanly to the latest version of IMCE-7.x-1.x-dev
Comment #8
joelpittetThis looks like it fixes a bunch of things, are all of these things needed for the CDN compatibility?
Unusual whitespace in this patch.
Maybe you are using tabs instead of 2 spaces?
Also need spaces around the " = " sign. And comments should start with a captital and end with a period for coding standards.
@see https://www.drupal.org/coding-standards#indenting
Comment #9
joelpittetHeads up adding it to the variable
cdn_exception_drupal_path_blacklist
fixed it for me. Which is in the UI under the page/admin/config/development/cdn/other
as Exceptions > Drupal PathAnd I just added
imce*
to that list.Hope that helps someone.
Comment #10
ufku CreditAttribution: ufku commentedClosing as per the blacklist workaround.