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

Bug: QField Sync Plugin Removes Path Segment from URL #605

Open
edouardbruelhart opened this issue Aug 19, 2024 · 2 comments
Open

Bug: QField Sync Plugin Removes Path Segment from URL #605

edouardbruelhart opened this issue Aug 19, 2024 · 2 comments

Comments

@edouardbruelhart
Copy link
Contributor

I've encountered a bug with the QField Sync plugin where it incorrectly handles the base URL for connecting to a self-hosted QFieldCloud instance, served using a custom nginx configuration. Specifically, the plugin is removing the /qfieldcloud/ segment from the URL, which leads to a 404 Not Found error when attempting to authenticate or interact with the API.

Steps to Reproduce:

Expected Behavior:

The QField Sync plugin should use the full base URL provided, including all path segments, so that requests are correctly routed to the API endpoints. For example, the URL https://emi-collection.unifr.ch/qfieldcloud/api/v1/auth/login/ should be used instead of https://emi-collection.unifr.ch/api/v1/auth/login/.

Actual Behavior:

The plugin removes the /qfieldcloud/ path segment from the URL, resulting in incorrect requests like https://emi-collection.unifr.ch/api/v1/auth/login/, which leads to 404 Not Found errors.

Additional Information:

I have tested to connect to the instance using a web browser, QField application and directly using curl and confirmed that it works with the /qfieldcloud/ path segment.
The issue seems to be specific to how the plugin constructs URLs.

Environment:

Thank you for your attention to this issue. Please let me know if you need any further details or if there is a workaround available.

@m-kuhn
Copy link
Member

m-kuhn commented Aug 19, 2024

Thank you for reporting this, we will happily accept a pull request to improve this !

@edouardbruelhart
Copy link
Contributor Author

I added a pull request to correct this. Let me know if it suits for you or if you want another mechanism to perform this

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

No branches or pull requests

2 participants