Skip to content
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

Fixed connection error when base url with '#' is provided as the connection url #273

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

ahmdthr
Copy link
Contributor

@ahmdthr ahmdthr commented Sep 24, 2024

If a url is copied from the browser from a GeoNode instance e.g., https://stable.demo.geonode.org/#/ it contains an a hash sign at the end which fails to connect. This fixes the issue by parsing the provided url.

This PR fixes issue 274.

@Gpetrak
Copy link
Contributor

Gpetrak commented Oct 3, 2024

@ahmdthr thank you for the PR. I tested the PR and although it doesn't have some conflict with the QGIS GeoNode plugin, it doesn't seem to fix this issue. In my tests the error remains the same.
I propose to add a similar change in the connection_dialog.py file also, since the connection settings are retrieved from the function get_connection_settings. Thus, if you replace the line:
base_url=self.url_le.text().strip().rstrip("/")
with
base_url=self.url_le.text().strip().rstrip("#/")
in the connection_diolog.py file (line 143)
https://github.com/GeoNode/QGISGeoNodePlugin/blob/main/src/qgis_geonode/gui/connection_dialog.py#L143
It will work.

@Gpetrak Gpetrak merged commit 9ca8c3f into GeoNode:main Oct 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GeoNode URL with '#' fails to connect
2 participants