-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
GeoNode API requests require a stronger minor version parsing #28911
Comments
Author Name: Giovanni Allegri (@giohappy)
|
Author Name: Giovanni Allegri (@giohappy)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Allegri (@giohappy) Giovanni, |
Author Name: Giovanni Manghi (@gioman) Giovanni Allegri wrote:
The rationale we use is: "high" is for issues causing crashes or data corruption or that are regressions. Does this issue fit it? |
Author Name: Giovanni Allegri (@giohappy) ok then this is not the case. This bug simply makes the provider unusable. |
Author Name: Robert Ward (Robert Ward) This bug is a bit of a red herring, yes it is a problem however if the code is made to correctly parse the minor version then no GeoNode layers are returned because the wrong code is executed to parse the json response. The following is what is returned from http://master.demo.geonode.org/api/layers/
Based on a version number of 2.10 the code executed expects to see values for the key 'links' which is not present in the above response. If the code is forced to execute the other code block where the expected version is 2.6 then the layers are correctly parsed. I have a GeoNode 2.8 instance that follows the same pattern and so GeoNode layers never appear in QGIS as they should do. I have a working patch that parses the GeoNode json response based on the contents rather than the version numbers. It appears the GeoNode documentation does not state what the responses format should be let alone how it has changed over the versions. If somebody could point me at a GeoNode instance to provide the alternative json response I can create a unit test and create a pull request to GeoNode functionality working again in QGIS. |
Author Name: Giovanni Allegri (@giohappy) The issue of missing links has been addressed recently (GeoNode/geonode@704b8d5) but master demo is not updated yet. |
Author Name: Alexander Bruy (@alexbruy)
|
Author Name: Alexander Bruy (@alexbruy)
|
Author Name: Alexander Bruy (@alexbruy)
|
Author Name: Giovanni Allegri (@giohappy) Thanks also from me ;) |
Author Name: Alexander Bruy (@alexbruy)
|
Author Name: Giovanni Allegri (@giohappy)
Original Redmine Issue: 21093
Affected QGIS version: 3.5(master)
Redmine category:data_provider/geonode
Assignee: Alexander Bruy
Currently QGIS parses GeoNode's version with a simple .toInt(): https://github.com/qgis/QGIS/blob/master/src/core/geocms/geonode/qgsgeonoderequest.cpp#L275
but GeoNode adds more informations to the minor version, for instance "rc" for a release candidate. This makes the parsing fail and thus layers are not fetched.
As an example look at the "geonode_version" field on the master demo instance: http://master.demo.geonode.org/api/layers/
Probably a simple regex would be fine to extract only the first numbers from the minor version part.
Related issue(s): #28958 (duplicates)
Redmine related issue(s): 21140
The text was updated successfully, but these errors were encountered: