-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the missing "startup_service" parameter from config.js #120
Comments
|
Can someone provide a hint as to how to test this correctly? I tried to use the example method in the Docs explained here: But that didn't seem to work, and I'm wondering if I missed a config setting in the Mapbook? Tested with 97b9ce2 and |
|
It was my understanding that its is possible to name the startup service in the mapbook section (http://docs.geomoose.org/2.8/docs/configuration.html#configuration): my_startup_serviceor in the config.js file: but neither of these work (since there is no code to handle them). The "call=" in the URL does work, although I don't know why the example given in the doc doesn't work. |
|
Based on those docs and mapbook.xml line 371, 393 and 405, I would think the url would be |
|
Eli, you are correct that I was missing that there was a second user input, and also that I didn't catch that I should specify the field name using value0. However, at least for me the URL pathway is still not working with: These 2 values do produce results via the form, so I think there is something else preventing the service from starting. Do I need to add anything to the |
|
Hey folks this should be reviewable now, I found a few different issues:
|
|
I'm marking this as closeable if someone disagrees, update and remove the flag. I'll leave this open for a few more days. |
|
I'll test here in a little bit... |
|
OK - I just did a little testing with 97b9ce2 & geomoose/geomoose-js@8ff516d and I'm seeing a little progress, but still not quite sure if this is working as expected:
This second bullet is where I'm confused - is there anything else that is intended to happen when |
|
startup_service should not be a boolean but the name of a service. Realistically, it should be either undefined or the name of a service not true or false. |
|
So tested with Is that all that is expected? or is there another non-URL test that should happen? |
|
Interesting. There are 3 separate ways of calling a startup service: config.js, mapbook, and URL. Should there be a priority if all 3 are used (which would not be the normal case)? BTW, in the past, I've just used the mapbook method to execute a service, which executes some PHP to send some GeoMOOSE API calls. |
|
Brent, the URL overrides the Mapbook which overrides the Config settings. |
|
That makes sense. We will have to document that. |
|
Hmm; a couple of problems with the code in trunk.
Currently as shipped, the value in config.js is boolean:
The startup_service_called variable is set just previously if already set. So we need to either change the code (this would be best), or document the priority. |
|
I fixed the ordering so that call overrides startup_service. It should be noted, however, that users are not supposed to be modifying config.js. That's what the mapbook <param..> convention is meant to do. |
From @brentfraser :
Specifying a startup service in the mapbook or in config.js doesn't seem to work. And I can't find any place in the code where startup_service is referenced.
So I added a few lines to main.js (at line 73):
/* --- new: --- */
if(GeoMOOSE.isDefined(CONFIGURATION['startup_service'])) {
var service_name = CONFIGURATION['startup_service'];
GeoMOOSE.startService(service_name, params, true);
}
The text was updated successfully, but these errors were encountered: