When initializing, EPSA Crop's _dialog() function calls drupal_json_encode on an unserialized object from _epsacrop_get_coords_from_fid. The problem is that although the rest of the JS code is agnostic of type, this piece produces an array as the output into #epsacrop-coords-data, rather than an object.
When the Apply callback is then triggered, the params that get built there use the NID as the index into this collection. If it was an object this would be no problem, but as an array, if you have a very high NID value (such as >26M, where my site is now), this produces a huge array that then crashes the browser.
I attached a patch file that fixes this behavior and allows the record to be saved by forcing the output to produce an object, rather than an array. I have not tested this against the rest of the cycle.
| Comment | File | Size | Author |
|---|---|---|---|
| epsacrop_array_size.patch | 695 bytes | crobinson |
Comments
Comment #1
Nick Lewis commentedNo negative byproducts observed over here. I actually think this may fix a real problem...
Comment #2
crobinson commentedIt doesn't look like anybody else is planning to review this patch. Has it been applied? If so, I can re-test against the development branch and give you a final review on it myself from my environment.
Comment #3
Nick Lewis commentedIt has not been applied to dev. It should be, however. This hasn't caused me any problems in the last weeks or so I've had it applied.
Comment #4
yvmarques commentedHi,
I've just committed the patch in the 7.x-2.x-dev. Thanks !
-- Yvan
Comment #5
yvmarques commented