Path

ez projects / novenimagecropper / forum / issues / not a valid ezjscserverrout...


Not a valid ezjscServerRouter argument

You need to be logged in to post messages in the forums. New users may register here.

Marco Zinn

Member since:
11 March 2003

Posts: 27

Tuesday 06 October 2009 8:24:28 pm

Hi,

i just tried with the new ez 4.2 release (which has ezjscore bundled and activated).
Whenever i try to crop or upload an image, i get this message "Not a valid ezjscServerRouter argument: novimgcrop:ImageReference:somenumbershere" instead of the image.

When i disable the extension, uploading and resizing images does work fine, so I don't think, its a permission thing.
ez Revision: 19785 , PHP 5.2.6 with GD
Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Tuesday 06 October 2009 8:51:32 pm

Hi Marco

This error seems to mean that the server functions of Noven Image Cropper are not registered in ezjscore...
Have you tried to purge the caches and to regenerate the autoloads ?

If you have ezjscore with 4.2, I guess you installed it with ezwebin, didn't you ?
Do you try to use novenimagecropper via front or backoffice editing ?
Up

Marco Zinn

Member since:
11 March 2003

Posts: 27

Tuesday 06 October 2009 10:16:41 pm

Solved...
I forgot to regenerate the autoloads.
Now, this works better.

Unfortunately, i now have some other problems:
a) Admin siteaccess:
After i made my selection of the crop area, and click on "Preview", i get a new message:
Handler class "ezcImageImageMagickHandler" not found.
ImageMagick not installed or not available in PATH variable.

That may be true: We don't use Imagemagick, only GD... Is ImageMagick really required?

b) User siteaccess (plain ezwebin 1.5 from ezP 4.2):
The popup dialog for doing the crop selection opens and i can see the label and the dropdown for the Aspect ration selection... But there is no picture... and no warning :(
No entries in the error.log when i do this.

So, i cannot use the extension yet ;)
But i see, that i must change some translations for german anyway ;)
Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Tuesday 06 October 2009 11:56:14 pm

Hi Marco

a) I guess you have ImageMagick enabled in one of your image.ini overrides (it's enabled by default with a plain ezwebin install)

b) This sometimes happens because of jCrop slowness. When it happens, try to reload the current page with your browser (do not cancel the draft). Does it work ?
Up

Marco Zinn

Member since:
11 March 2003

Posts: 27

Wednesday 07 October 2009 12:22:36 am

Hi,

sorry, but

a) No, ImageMagick was enabled nowhere.
In settings/override.ini, i had



[ImageMagick]


IsEnabled=false



This was set by the install wizard, as i don't have IM on the server.
I tried with adding



[ImageConverterSettings]


ImageConverters[]


ImageConverters[]=GD



to get rid of any reference to IM... but to no avail. Still the same message.

b) No... sorry.
When i reload the page (F5 or "Reload" icon... Firefox 3 on WinXP), the "popup" window just disappears and i see the "edit image object" screen again.
I noticed, that, when i choose an aspect ratio from the dropdown list, there is a small square in the top left corner... seems as the image is just 0x0 pixels wide or so.
Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Wednesday 07 October 2009 12:41:51 am

Indeed, if ImageMagick is totally out of the system, I manage to reproduce your problem. I'm gonna check in the ezcomponents doc :)
Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Wednesday 07 October 2009 2:47:34 pm

Hi

a) fixed in trunk (rev 33)
b) I'll check this one later

Please note that I have added a new error message in translation file. Could you translate it in german please ? :-p
Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Thursday 08 October 2009 7:19:53 pm

Hi

I checked the problem with ezwebin frontend editing. In fact this is a problem dealing with declared image aliases in image.ini. reference alias is not declared by default in ezwebin frontend siteaccess.

So all you have to do is to activate it in your image.ini frontend siteaccess override :



   AliasList[]=reference


 

   [reference]


   Filters[]


   Filters[]=geometry/scaledownonly=600;600




I updated the doc in SVN :)
Up

Marco Zinn

Member since:
11 March 2003

Posts: 27

Thursday 08 October 2009 8:30:55 pm

Thanks, that works great!

I think, the "reference" alias definition actually is "removed" by the install wizard, which sets up the different siteaccesses. In each language siteaccess, the list of ImageAliases as cleared and re-defined in the image.ini.append file, but without the "reference" alias. The only exception seems to be ezwebin_site_admin siteaccess (luckyly)

What worked for me: create an image.ini.append.php in the settings directory of the novenimagecropper extention with this content:



<?php /* #?ini charset="utf-8"?


 

[AliasSettings]


AliasList[]=reference


 

[reference]


Filters[]


Filters[]=geometry/scaledownonly=600;600


 

*/ ?>




One thing, though: I though of the "reference" ImageAlias as a "technical" Alias: You can use it as a base image resolution for creating other (smaller) ImageAliases of your picture. So, i will be the same size or larger than the largest Alias, that is intended to be shown in screen. But images of the "reference" Alias usually are not shown on screen and maybe still be quite large.

By using the reference Alias for your popup window, you force the admin to reduce this Alias' size to something reasonably small, because it must fit on the screen AND still have space around it for your GUI elements.

So, what don't you define and use your own ImageAlias for your extension? Just name if "novenimagecroppreview" or so ;) and it won't interfere with any other defintion my site may have.
I guess, it's a one-line change in line 111



$referenceAlias = $imageHandler->attribute('novenimagecroppreview'); // Cropping UI is based on "novenimagecroppreview" alias



Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Friday 09 October 2009 10:27:02 am

Hi Marco

You're absolutely right !
So I replaced reference image alias by a new one : novenimagecropper_reference.

Implemented in trunk, rev 41.
Can you please confirm it's OK for you ?
Thanks :)
Up

You need to be logged in to post messages in the forums. New users may register here.