Bug report #16624

Postgis connections with a slash in the name are hidden/misnamed

Added by Sandro Santilli over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GUI
Affected QGIS version:2.18.8 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24524

Description

1. Click on "Add PostGIS Layer"
2. Click on "New Connection"
3. Call the new connection "test/1"

Expected behavior: on creating the connection, there's a new "test/1" connection shown in the connection selection widget.
Obtained behavior: the connection selection widget has just a "test" connection

Further steps:

4. Click on 'Add PostGIS Layer"
5. Click on "New Connection"
6. Call the new connectoin "test/2"

Expected behavior: there are now 2 connections
Obtained behavior: there's still a single connection, still only named "test"

Further steps:

7: Create a new connection, calling it "test/1"

Expected behavior: as there's a single connection, called "test", I'd now expect "test/1" to be created
Obtained behavior: the GUI complains that "test/1" already exists (but isn't shown)

So basically I'm left with a single "test" connection shown in the connections list but QGIS really knows about "test/1" and "test/2" enough that I cannot use those as names for new connections.

This behavior was detected with cea93faa252db67ec007849bad9a7a070dd27b2b (release-2_18 branch targetted at 2.18.9)


Related issues

Related to QGIS Application - Bug report #9131: WMS/WMTS dialog - loses text after / Closed 2013-11-27

Associated revisions

Revision 30900e9b
Added by Jürgen Fischer almost 7 years ago

don't allow slashes in http connection names (fixes #9131)

Revision 8c873b14
Added by Jürgen Fischer over 3 years ago

avoid slashes in connection names (followup 30900e9b8; fixes #16624)

Revision dcd99ad5
Added by Jürgen Fischer over 3 years ago

avoid slashes in connection names (followup 30900e9b8; fixes #16624)

(cherry picked from commit 8c873b14b8a572aa7d65d31381357844c3d73aeb)

Revision 63269479
Added by Jürgen Fischer over 3 years ago

fix 8c873b14 (fixes #16624)

Revision 5f10a0ba
Added by Jürgen Fischer over 3 years ago

fix 8c873b14 (fixes #16624)

(cherry picked from commit 63269479682b9b71d0de74b518de09d5f72029d2)

History

#1 Updated by Sandro Santilli over 3 years ago

Further steps: opening DBManager shows a "test" connection, attempts to open it result in an error: 'There is no defined database connection "test".'.

#2 Updated by Jürgen Fischer over 3 years ago

#3 Updated by Jürgen Fischer over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#4 Updated by Sandro Santilli over 3 years ago

  • Status changed from Closed to Reopened

I just got the same (or very similar) problem.
This time I named my connection: "[email protected]:5432/strk (pgpass test)"
When I went trying to open it on DBManager it failed with "No connection named '[email protected]:5432' exists".
Or something like that...

#5 Updated by Jürgen Fischer over 3 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF