Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If 'feature_limit' option is set to 0, then any drawn features disappear immediately. This is due to the 'event.feature.layer.removeFeatures' method call on 'featureadded' event type. Which in turn is due to the fact that 'behavior.feature_limit' is string, so has the bool value 'True'. Thus the condition (event.type == 'featureadded' && behavior.feature_limit && $(behavior.feature_limit < event.object.features.length)
is always performed for the corresponding operation.
Comment | File | Size | Author |
---|---|---|---|
#1 | ole-immediate_removal-2263331.patch | 694 bytes | yevhen |
Comments
Comment #1
yevhen CreditAttribution: yevhen commentedComment #2
DrupaListo.com CreditAttribution: DrupaListo.com commentedyou are right in principle:
"0" is a string, and since it's not empty, it's evaluated to true
but in current module version 7.x-1.1, the behavior.feature_limit is a js null value when the cck field cardinality is unlimited.
So this bug is not dangerous imho, but needs 1-2 mins thought from lead maintainer and then commit/skip and mark issue as wont fix/fixed.
Cheers.