CE Image
ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3
Back to this add-on's main page
View Other Add-ons From Causing Effect
Some remote image not rendering even though the paths are correct
Support (Resolved)
Jim Pannell
|
Posted: 11 January 2012 06:34 PM |
|
|
|
Hi Aaron
I’m running EE 1.6.8 (crazy I know!) and am having a strange issue whereby some external images that CE Image is resizing aren’t being rendered at all (there’s just no output at all). I’m not sure of the percentage, but it looks like less than 10 - still unacceptable to my client though.
I’ve turned template debugging on but in 1.6.8 I don’t get anything useful really. Here’s the debug output of an image that didn’t output anything:
(1.292416) Tag: {exp:ce_img:pair src="http://www.alps-luxury.com/photos/1392_008.jpg" width="133" height="100" fallback_src="/images/fallback-image.png" cache="yes" refresh="360"}
If you try this image in your browser, you’ll see that it works. If there was something wrong with the image I’d expect to see the fallback image instead, but that doesn’t even show. I get zilch output apart from what’s in the debugger.
To give you a little more info, this is in a real estate property search results page using Solspace Super Search. Other images from the same domain (alps-luxury.com) are being shown before and after the blanks.
Again, this is an external (remote) image rather than a local one.
Any help would be really appreciated.
Jim
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 11 January 2012 08:04 PM |
# 1
|
|
Developer
|
Hi Jim!
Sometimes the images fail the XSS check that is enabled by default. If you trust the source of the remote images (which it sounds like you do), you can use the disable_xss_check=“yes” parameter to turn it off.
Please let me know how that goes! ;)
|
|
|
Jim Pannell
|
Posted: 12 January 2012 01:08 AM |
# 2
|
|
|
That fixed it! Wonderful!!!
Thanks a million Aaron. How did we possibly survive before you arrived on the scene?
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 12 January 2012 01:45 AM |
# 3
|
|
Developer
|
Hahaha, glad to hear it Jim! I’m actually surprised you don’t hate me by now; helping you with Amazon S3 is currently the oldest item on my todo list…
|
|
|
Jim Pannell
|
Posted: 12 January 2012 03:00 AM |
# 4
|
|
|
Not at all Aaron. I’ve kind of given up on that one to be honest, figuring that it might have been not possible with my EE 1.6.8 install. However, I’ve just spent the last week moving it to a new server where I have 100% control. Perhaps there were some php modules that weren’t installed that I needed…
|
|
|
Jim Pannell
|
Posted: 22 March 2012 04:20 PM |
# 5
|
|
|
Hey Aaron
Me again I’m afraid. Same site, same problem although this time disable_xss_check isn’t helping at all.
It’s a remote image so anything should be able to get it working in theory. Can you perhaps try this?
{exp:ce_img:pair src="http://image-repository.my-french-house.com/properties/20/2010/05/11/05.jpg" width="462" height="312"}<img src="{made}" alt="" />{/exp:ce_img:pair}
I get no output at all and nothing in template debugging to suggest a problem.
Cheers
Jim
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 23 March 2012 02:54 AM |
# 6
|
|
Developer
|
Hi Jim!
I first tried your code and it didn’t work (it actually threw an error, which looks like a regex problem with the CodeIgniter core XSS filter when filtering something with numbers?). I then added:
disable_xss_check="yes"
to the tag, and now I see a picture of beautiful house with a pool on the side of a hill overlooking the ocean…
I get no output at all and nothing in template debugging to suggest a problem.
What does template debugging say about that image? Nothing at all?
|
|
|
Jim Pannell
|
Posted: 23 March 2012 02:58 AM |
# 7
|
|
|
Hi Aaron
The thing is, I still get no output when I use the xss filter tag. I’m on 1.6.8 so there’s no error information in the template debugging output.
Bit stumpted with this…
Jim
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 23 March 2012 03:00 AM |
# 8
|
|
Developer
|
I’m on 1.6.8 so there’s no error information in the template debugging output.
There should be. You have to be logged into the site in question as a super admin, and have template debugging enabled.
You may also try and clear your cached files in your ‘remote’ folder, at least for the domain of the remote image.
|
|
|
Jim Pannell
|
Posted: 23 March 2012 03:14 AM |
# 9
|
|
|
Here’s the debugging output I’m getting from the following template code:
{exp:ce_img:pair src="http://image-repository.my-french-house.com/properties/20/2010/05/11/05.jpg" disable_xss_check="yes" width="462" height="312"}<img src="{made}" alt="" />{/exp:ce_img:pair}
Note that this is being run on http://www.my-french-house.com and that image-repository is actually a subdirectory of the root of http://www.my-french-house.com (there are only a few images using this sub domain - I realise it will slow things down with CE Image).
Debugging output:
(0.008104) Tag: {exp:ce_img:pair src="http://image-repository.my-french-house.com/properties/20/2010/05/11/05.jpg" disable_xss_check="yes" width="462" height="312"} (0.008263) Closing Tag Found (0.008314) Processing Tags (0.008341) Plugin Tag: Ce_img/pair (0.008355) Including Files for Tag and Modules (0.008744) Beginning Final Tag Data Processing (0.008763) Calling Class/Method: Ce_img/pair (0.008877) -> Class Called: Ce_img (0.008904) -> Method Called: pair (0.012959) Returning No Results Content (0.012995) -> Data Returned (0.013032) - End Tag Processing -
‘Returning no results content’ doesn’t sound too positive.
Any ideas?
Cheers
Jim
|
|
|
Jim Pannell
|
Posted: 23 March 2012 03:16 AM |
# 10
|
|
|
UPDATE: If I change the URL to http://www.my-french-house.com/image-repository/properties/20/2010/05/11/05.jpg it works, so it’s because of the sub domain that it’s not working.
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 23 March 2012 03:31 AM |
# 11
|
|
Developer
|
‘Returning no results content’ doesn’t sound too positive.
To find out why, you need to find the debug info that starts with “*** CE Image debug:”. It should look something like:
(0.026034 / 6.16MB) Calling Class/Method: Ce_img/single (0.026140 / 6.16MB) -> Class Called: Ce_img (0.026170 / 6.16MB) -> Method Called: single (0.038385 / 7.17MB) *** CE Image debug: Base path: '/your/current/document/root/' (0.038408 / 7.17MB) *** CE Image debug: Source image: 'images/example/not_real.jpg', Fallback image: '' (0.038429 / 7.17MB) *** CE Image debug: Source image is not readable or does not exist: 'images/example/not_real.jpg'. (0.038442 / 7.17MB) *** CE Image debug: Fallback source image is not readable or does not exist: ''. (0.038471 / 7.17MB) Returning No Results Content (0.038555 / 7.16MB) -> Data Returned
UPDATE: If I change the URL to http://www.my-french-house.com/image-repository/properties/20/2010/05/11/05.jpg it works, so it’s because of the sub domain that it’s not working.
I don’t get it. The image is not at ‘http://www.my-french-house.com/properties/20/2010/05/11/05.jpg’, it is at ‘http://image-repository.my-french-house.com/properties/20/2010/05/11/05.jpg’, right?
Are you using the $conf[‘ce_image_src_regex’] (it should say so if you are in the debug info). If not, you should be able to add something along these lines to your config (which will also make it faster and use up less server space, as you are not having to redownload the image to your server using cURL):
$conf['ce_image_src_regex'] = array( 'http://image-repository.my-french-house.com/' => '/server/path/to/image-repository/web_root/goes/here/' );
|
|
|
Jim Pannell
|
Posted: 23 March 2012 04:28 AM |
# 12
|
|
|
http://image-repository.my-french-house.com actually points to http://www.my-french-house.com/image-repository, so both locations share the same base path.
Doing a search on http://image-repository.my-french-house.com and replacing it with http://www.my-french-house.com/image-repository totally fixed the problem.
Still not 100% sure why… Also, on 1.6.8 I never get anything like “*** CE Image debug:” in the debugging output.
|
|
|