Ticket #894 (closed Defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Annoying message in logfile

Reported by: JuergeN Owned by: jri
Priority: Major Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: Malte
Complexity: 3 Area:
Module: deepamehta-geomaps

Description

The logfile gets flooded with useless messages of this kind:

Request "GET /theme/default/style.css" failed. Responding with 404 (Not Found).

What can we do to stop that? Do we need the style.css and where should it be located?

Change History

comment:1 Changed 9 years ago by jri

  • Cc Malte added
  • Status changed from new to accepted
  • Module set to deepamehta-geomaps

Agreed. This request is annoying.

It is issued by the OpenLayers? library (Geomaps module). OpenLayers? tries to find out its installation directory in order to load its required style sheet. But it can't find the installation directory as the Geomaps module loads OpenLayers? dynamically.

(This failing request was always there but only since DM 4.7 it is logged at server-side.)

At the time I wrote the Geomaps module I coudn't find out how to tell OpenLayers? where to load its stylesheet from. Perhaps Malte can help here as he has more OpenLayers? experience. I will further investigate too.

It would be nice if we could fix this in DM 4.7.1

comment:2 Changed 9 years ago by Malte

I do not know which OL version you're using exactly but if your on 2.x you may want to try to set the "theme" option of the "Map" object you're initializing to "null". This may solve the request for the default theme on init.

http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.theme

See also https://github.com/openlayers/openlayers/issues/1276
Discussion: http://trac.osgeo.org/openlayers/ticket/2619

And note that a "Control" object could also try to load the theme a second time, see:
https://github.com/openlayers/openlayers/issues/1067

Hope this helps.

comment:3 Changed 9 years ago by Jörg Richter <jri@…>

In ed711752f7d860281507163556f95e4da1ba21ea/deepamehta:

Geomaps: suppress bad style.css request (#894).

The Geomaps module doesn't issue this failing request anymore:

GET /theme/default/style.css

Thank you very much, Malte, for providing the proper hint!
Adding the theme: null option to the Map constructor was the solution indeed.
Great!

See #894.

comment:4 Changed 9 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.