Because the module has it's JavaScript included in the .info file it is loaded on every page request when JS aggregation is enabled:
"every_page: For optimal front-end performance when aggregation is enabled, this should be set to TRUE if the JavaScript is present on every page of the website for users for whom it is present at all. This defaults to FALSE. It is set to TRUE for JavaScript files that are added via module and theme .info files."
The module's JavaScript assumes there is an OpenLayers object, but on pages where there is no OpenLayers functionality this is not the case and the JavaScript throws an error ("OpenLayers is undefined") disrupting any other JavaScript processing.
If there is no reason for the JavaScript to be loaded on every page (and I do not really see one), please remove it from the .info file so that JS aggregation can be enabled.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | openlayers_geosearch-JS_errors_aggregation_enabled-2280537-1.patch | 363 bytes | marty2081 |
Comments
Comment #1
marty2081 commentedPatch attached.
Comment #2
marty2081 commentedComment #4
batje commentedCommitted to dev