Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#626 closed defect (worksforme)

Issues with setSpatial_Request and mod_wfs.php

Reported by: mschulz Owned by: dev
Priority: major Milestone: 2.7 release
Component: wfs Version: 2.7 rc1
Keywords: Cc:

Description

I have experienced issues with wfs_SpatialRequest that I tracked down to timing problems when loading the mapbender application. It can obviously happen, that mod_wfs is loaded so slow or so late, that the init method (aka the method that reloads mod_wfs to load the correct wfs_confs) is registered to the Mapbender Init event, even after that has already been triggered, thus it won't reload itself and fetch the correct wfs_confs.

Change History (2)

comment:1 by mschulz, 14 years ago

Resolution: worksforme
Status: newclosed

I've come up with an ugly workaround, if someone stumbles into the same problem. I'm not going to commit this, since I think there should be a better solution.

--- mod_wfs.php (revision 5752)
+++ mod_wfs.php (working copy)
@@ -43,7 +43,12 @@
        var functionStatement = window.name+".fetchInf()";

        if(!parent.eventInit.isRegistered(functionStatement)){
-               parent.mb_registerInitFunctions(functionStatement);
+               if (parent.Mapbender.events.init.done === true) {
+                       parent.mb_registerInitFunctions(functionStatement);
+                       fetchInf();
+               } else {
+                       parent.mb_registerInitFunctions(functionStatement);
+               }
        }
 }
 function fetchInf(){

comment:2 by christoph, 14 years ago

if it's working, please commit in 2.6 branch.

The module will be refactored anyway in the trunk in the long run. Hopefully not too long...

Note: See TracTickets for help on using tickets.