Bug 126624 - Suggested database connection string parameters incorrect in URL entry dialog
Summary: Suggested database connection string parameters incorrect in URL entry dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.3.0
Keywords: bibisected, bisected
Depends on:
Blocks: Database-Connectivity
  Show dependency treegraph
 
Reported: 2019-07-30 14:48 UTC by Alex Thurgood
Modified: 2022-03-30 07:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2019-07-30 14:48:12 UTC
Description:
1) Try to create an ODB file using the DB creation wizard and choose the option JDBC.

2) In the connection string URL entry dialog (above the field for entry of the string), a suggestion is made to use the following string:

Datasource URL (e.g. host=$host:$port dbname=$database)

This suggestion is completely wrong and will lead to a user spending hours trying to guess what the correct string might be (or trawling the internet for it)


Steps to Reproduce:
See above

Actual Results:
Incorrect suggestion for datasource connection parameters leading to failure to establish valid connection

Expected Results:
The suggestion should either be removed completely, or else tailored to the chosen type of database for which a connection is desired


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Xisco Faulí 2019-08-08 11:40:05 UTC
I don't think this is a regression. It changed in https://cgit.freedesktop.org/libreoffice/core/commit/?id=842812a01c9ff959308a1d373fc5daae10304005 though

We can either remove it or add a specific example for each ddbb.
@Alex, what do you prefer?
Comment 2 Julien Nabet 2019-08-08 11:51:49 UTC
I don't remember why I had done this but no pb to revert it.
In fact, I think we should completely remove the example part.
Someone who uses Base and needs an URL, knows what he/she does so not a beginner.
Comment 3 Alex Thurgood 2019-08-09 10:54:18 UTC
I agree, removing it would be easier, especially seeing as most of the connection strings can be found elsewhere (help, guides, internet, forums, etc)
Comment 4 Alex Thurgood 2019-08-09 11:00:55 UTC
Alternatively, we could use something like :

"Enter the DB-specific connection URL here"

but given that removing the string in the first place reduces the number of resource string translations by one, and that that must be a good thing, perhaps it is easier to do that ;-)
Comment 5 Julien Nabet 2019-08-10 07:11:11 UTC
Lionel/Xisco/Heiko: what would you prefer between:
1) A very generic comment like "Enter the DB-specific connection URL here"
2) No comment at all
3) Other
?
Personally, I agree for no comment at all here.
(I remember too that Lionel indicated Postgresql should have its own dialog, I agree of course but that's another story)
Comment 6 Lionel Elie Mamane 2019-08-11 10:46:09 UTC
I would rather write "connection string" than "connection URL" since not all databases use URLs; e.g. the new PostgreSQL format does not use an URL. The use of "URL" in the text is probably just inherited from JDBC.

I vote for some very generic text, such as "Connection string", without the "(e.g. ...)" part.
Comment 7 Heiko Tietze 2019-08-12 06:57:25 UTC
Can't we give a proper example like "127.0.0.1:8001/mydatabase"? And perhaps split the database name from the url. Ultimately it's also a documentation topic since help is missing.
Comment 8 Xisco Faulí 2019-08-12 08:38:18 UTC
Yep, another option would be to have a generic text like in comment 6 + the specific info for each ddbb in the help
Comment 9 Alex Thurgood 2019-08-12 10:11:18 UTC
(In reply to Lionel Elie Mamane from comment #6)


> I vote for some very generic text, such as "Connection string", without the
> "(e.g. ...)" part.

+1 from me for that.
Comment 10 Alex Thurgood 2019-08-12 10:22:22 UTC
(In reply to Heiko Tietze from comment #7)
> Can't we give a proper example like "127.0.0.1:8001/mydatabase"? And perhaps
> split the database name from the url. Ultimately it's also a documentation
> topic since help is missing.

The problem with the example you suggest is that it is specific to certain kinds of database engine, i.e. it isn't generic enough to work with our current connection string handling.

Ideally, the dialog itself would provide for separate fields for each part of the connection string and an extra field for supplementary parameters (where daisychaining of such connection string parameters is allowed), and would only provide those fields that would correspond to the selected DB type. In such a case, we could have example resource strings for each type of DB connection, but we are talking about at least of tens of different DB engines (certainly all of the main ones out there in use today). It seems to me that there is currently no way to do this simply (from a UI perspective) without causing frustration for the end user, which is why having an entirely generic comment like Lionel suggests, or nothing at all, would be more appropriate. Our help files have improved in this regard and do provide the connection strings for at least some (certainly not all) of the DB connection types we support.
Comment 11 Alex Thurgood 2019-08-12 10:24:37 UTC
The irony of the situation in which we find ourselves wrt Java is quite striking, as JDBC drivers seem to be far more prevalent than any other kind of driver in the FOSS world.
Comment 12 Lionel Elie Mamane 2019-08-12 12:58:30 UTC
(In reply to Alex Thurgood from comment #10)
> Ideally, the dialog itself would provide for separate fields for each part
> of the connection string and an extra field for supplementary parameters
> (where daisychaining of such connection string parameters is allowed), and
> would only provide those fields that would correspond to the selected DB
> type. In such a case, we could have example resource strings for each type
> of DB connection, but we are talking about at least of tens of different DB
> engines (certainly all of the main ones out there in use today). It seems to
> me that there is currently no way to do this simply (from a UI perspective)
> without causing frustration for the end user (...)

It *is* possible, it is just more work. It means making a separate dialog for each DBMS, like e.g. MySQL already has. It is completely possible, it just needs work in LibreOffice UI and/or documentation for each DBMS.

There are two things in my mind:

 * the one-line patch that we should do *now* to remove,
   from the prompt that is used for _all_ DBMS
   (that don't have a specific UI dialog in LibreOffice),
   the misleading / wrong example.

 * the "more work, but better for the user" solution,
   which would be something like a combination of:

   - lots of examples in documentation

   - several DB-specific UI in the LibreOffice "new connection" dialog

But anyway, even if we do the "more work better" version, we _still_ need to have a generic fallback for the unknown DBMS, so we _still_ need to do this one-line patch.
Comment 13 QA Administrators 2021-08-12 03:57:19 UTC Comment hidden (obsolete)
Comment 14 Alex Thurgood 2021-08-26 20:51:25 UTC
Bug is still present in LO7152, 7204 and LODev73alpha.
Comment 15 Commit Notification 2021-08-31 05:16:12 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d4e4e273a5960fcf933729d153de76ecf796aca5

tdf#126624: do at least the generic solution

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Julien Nabet 2021-08-31 05:17:36 UTC
Let's put this one to FIXED since the string freeze is finished on 7.2 branch.
About specific string for each DBMS, if someone wants to submit a new bugtracker, don't hesitate of course!
Comment 17 Alex Thurgood 2021-08-31 06:09:40 UTC
Thanks Julien, great stuff!

I don't have a build environment for LO on any OS currently, so can't really comment on git changes.