For performance reasons we are running the site behind a varnish and strips all cookies except from whitelisted ones.

Also, we know that all users with access to the cropping-tool has javascript enabled, so we'd like to skip the check for the has_js=1 cookie.

This patch lets us define a drupal variable named "manualcrop_skip_js_check" - if it's true, the module won't look for the has_js cookie.

Comments

esbenvb’s picture

Here's a patch.

IMPORTANT: When porting the patch, remember to include the correct author information as mentioned here: http://drupal.org/user/989064

rickmanelius’s picture

Status: Needs review » Needs work

Hi esbenvb. Any chance we can expose this variable in an admin form?

esbenvb’s picture

Of course that could be an option but there's no general admin interface for manualcrop as far as I know, and since this is a setting that's only supposed to be set once, by an administrator, it could easily be done in either an install hook, in a "drush vset" command, using strongarm or using features.

matthijs’s picture

Assigned: Unassigned » matthijs
Status: Needs work » Fixed

I agree with rickmanelius that there should be an interface setting for this. I reworked your patch (so I didn't use git attribution, but I mentioned you in the comment) to include a global settings form and pushed it to repository. Please note that I also moved the cache control setting to that new form.

Thanks for the patch!

Matthijs

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

capellic’s picture

After this upgrade, I noticed that all available Manual Crop Image Style profiles were appearing in a select field for the images that have Manual Crop configured. In my situation, I only have one profile set per field, so the select should not appear. To fix this, I simply go to the edit form for the fields in question and and save them. And yes, I ran update.php.

esbenvb’s picture

#4 Matthijs I'm glad to hear that you ported the patch.

BUT even though you reworked it and made a UI for setting the variable, I don't think you should skip the GIT attribution.

You can just apply my patch as it is, commit the changes with my attribution, and THEN do your changes to the GIT repo. Remember that for next time... It's not fatal or anything but I just think that it's nice to see my name on project commits that contains code I wrote.