Ticket #1549 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

lite.cfg should include Console.js

Reported by: openlayers Owned by:
Priority: minor Milestone: 2.8 Release
Component: general Version: 2.6
Keywords: Cc:
State: Complete

Description

Some extra String functions such as trim() are using Console to report back the user they are deprecated... but since Console.js is not included in the lite.cfg configuration, the net result is a javascript error. This of course will happen for anything else that uses Console messages. Adding Console.js to the configuration seems to fix the problem without significantly affecting the size of the built OL.

A quick check with Eclipse reveals there are 72 usages of Console.js around the code base, and none of them checks for Console to be around, so I guess all of them would trigger the same error.

Attachments

trim.htm Download (0.6 KB) - added by openlayers 5 years ago.
Sample failing with the 2.6 release built with lite.cfg

Change History

Changed 5 years ago by openlayers

Sample failing with the 2.6 release built with lite.cfg

Changed 5 years ago by pgiraud

I had a similar issue when I launched a small application with a built version of OpenLayers in a browser with french language. Adding the link to the french i18n javascript file fixed it.

Changed 5 years ago by openlayers

Btw, I'm seeing this exact error on a production site here:  http://maps.co.mecklenburg.nc.us/gp/#

And some other people are not seeing it... strange... I'm on FF 3 beta 5, tried with IE 7 as well, same error, OpenLayers.Console not defined...

Changed 4 years ago by crschmidt

  • milestone set to 2.8 Release

I want to look into this for 2.8.

Changed 4 years ago by crschmidt

  • status changed from new to closed
  • state set to Complete
  • resolution set to fixed

(In [8948]) OpenLayers.Console is used throughout the code, but not added as a dependancy. Add @requires statements to pull it in everywhere it is needed. Since Console is so small -- 634 bytes -- this should have a limited impact on anyone with a custom build profile. (Closes #1549)

Note: See TracTickets for help on using tickets.