jit_image_manipulation icon indicating copy to clipboard operation
jit_image_manipulation copied to clipboard

Problems with square source images in JIT 2.0.0

Open animaux opened this issue 9 years ago • 21 comments

Apparently JIT 2 chokes on square images in Mode 4 if the output is square too:

If the source image is 800×800px:

…/image/4/400/400/img/bilder/filename.jpg.jpg

this render the invalid dimensions error, whereas

…/image/4/400/401/img/bilder/filename.jpg

works as expected.

hueylhtbs5510406786331740

Using the first recipe with non-square images works fine. Also all the other modes with the square.

animaux avatar Apr 28 '16 06:04 animaux

When using the same settings in a recipe Symphony throws:

Symphony Fatal Error: No JIT filter was found for this request.

Not sure if this is a result of the error above or a different issue.

Reverting back to JIT 1.4.4 (including the .htaccess-rules) solves both issues. Which also leads me to the point that the rewrite rules in the readme should be updated to the current version in 2.0.0!

animaux avatar Apr 28 '16 06:04 animaux

Which also leads me to the point that the rewrite rules in the readme should be updated to the current version in 2.0.0!

Done in c7cd618

this render the invalid dimensions error, whereas

Done in 3d92d82

Would you mind testing against the integration branch to see if the "no filter found" error persists ?

Thanks!

nitriques avatar May 01 '16 20:05 nitriques

@brendo Would you mind reviewing 3d92d82 ? Thanks!

nitriques avatar May 01 '16 20:05 nitriques

Sure, will try tomorrow!

animaux avatar May 01 '16 20:05 animaux

Thanks @animaux

nitriques avatar May 01 '16 20:05 nitriques

Sorry to report: All above mentioned problems persist in integration.

animaux avatar May 02 '16 06:05 animaux

Plus in mode 2 JIT seems to ignore the smaller value. Weird.

animaux avatar May 02 '16 06:05 animaux

Well I do not know what to do as I can't seem to reproduce the error anymore. I'll check the mode 2 ASAP.

nitriques avatar May 02 '16 14:05 nitriques

@animaux Can you please test the latest integration branch please ? Thanks!

nitriques avatar Jun 07 '16 00:06 nitriques

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (image.php, line 0)

I now get links like:

http://…/extensions/jit_image_manipulation/lib/image.php/?param=2/136/136/5/img/bilder/20080718_25-b-pikto-800-neu-1420714412.jpg

Following these links results in a 500.

animaux avatar Jun 07 '16 06:06 animaux

Yeah, can you please update your .htaccess rule please ? Is this a new install ?

RewriteRule ^image\/(.+)$ index.php?mode=jit&param=$1 [B,L,NC]

nitriques avatar Jun 07 '16 14:06 nitriques

URLs now look better, I still get 500s for each image though. Will check the logs.

animaux avatar Jun 07 '16 14:06 animaux

It’s an older updated site, to be precise: a local copy of it.

animaux avatar Jun 07 '16 14:06 animaux

Hum... Anything in php's error_log?

nitriques avatar Jun 07 '16 14:06 nitriques

It’s running PHP 5.6.10

From the Symphony-Log:

07. June 2016 16:43 > UNKNOWN: ErrorException 0 - Illegal string offset 'allow_origin' on line 289 of /…/extensions/jit_image_manipulation/lib/class.jit.php

animaux avatar Jun 07 '16 14:06 animaux

Ah damn it. I'll fix this ASAP. Been testing it mostly on old 5.3. Bad me.

nitriques avatar Jun 07 '16 14:06 nitriques

No worries. Thanks!

animaux avatar Jun 07 '16 14:06 animaux

@animaux can you test cae4de7 ? Thanks!

nitriques avatar Jun 07 '16 15:06 nitriques

I’ve tried Mode 2. Looking good so far.

animaux avatar Jun 08 '16 06:06 animaux

From integration

animaux avatar Jun 08 '16 06:06 animaux

Great!

nitriques avatar Jun 10 '16 00:06 nitriques