I am working on debugging a site that I inherited from another developer. One of the issues is that the OpenLayers map was broken in Internet Explorer 8. When loading, the browser would display the following message:

Message: Arg: Fraction out of range (0 to 1 allowed)
Line: 2597
Char: 1
Code: 0
URI: http://openlayers.org/api/2.11/OpenLayers.js

After a while, I discovered that someone had set the fillOpacity in the style properties of a style to 2, despite the fact that the help text clearly states that "This should be a value between 0 and 1."

Perhaps we might add a validate function to ensure that this value is being set properly when the form is being filled out, or check that it is not greater than 1 when creating the map?

CommentFileSizeAuthor
#7 1719598.patch1.13 KBpol
#6 1719598.patch1.13 KBpol
#4 1719598.patch1.09 KBpol
#2 1719598.patch12.96 KBpol

Comments

pol’s picture

Assigned: Unassigned » pol

I take care of this.

pol’s picture

Status: Active » Needs review
StatusFileSize
new12.96 KB

First shot of the patch.

Status: Needs review » Needs work

The last submitted patch, 1719598.patch, failed testing.

pol’s picture

Status: Needs work » Needs review
StatusFileSize
new1.09 KB

Status: Needs review » Needs work

The last submitted patch, 1719598.patch, failed testing.

pol’s picture

Status: Needs work » Needs review
StatusFileSize
new1.13 KB
pol’s picture

StatusFileSize
new1.13 KB

I made the patch without testing, if someone can test it, I can commit it tonight.

pol’s picture

Status: Needs review » Fixed

Committed ! Thanks for the report !

I did not used the patch I made, I used the #element_validate property for elements in the form.

http://drupalcode.org/project/openlayers.git/commitdiff/f15b420?hp=48a73...

Status: Fixed » Closed (fixed)

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