Bug 147974 - Writer has an issue with multiple .csv address book data source connections
Summary: Writer has an issue with multiple .csv address book data source connections
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.8.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-13 21:22 UTC by David
Modified: 2023-12-24 15:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
data source (937 bytes, text/csv)
2022-03-27 18:30 UTC, David
Details
file that uses data source (12.93 KB, application/vnd.oasis.opendocument.text)
2022-03-27 18:32 UTC, David
Details
file that uses data source (79.82 KB, application/vnd.oasis.opendocument.text)
2022-03-27 18:39 UTC, David
Details
A writer document detailing how I set up and use the mail merge function. (136.51 KB, application/vnd.oasis.opendocument.text)
2023-12-23 21:04 UTC, David
Details
file that uses mail merge (95.17 KB, application/vnd.oasis.opendocument.text)
2023-12-24 15:15 UTC, David
Details
file that uses mail merge (16.72 KB, application/vnd.oasis.opendocument.text)
2023-12-24 15:15 UTC, David
Details
a file that uses mail merge (106.25 KB, application/vnd.oasis.opendocument.text)
2023-12-24 15:18 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2022-03-13 21:22:53 UTC
Description:
I have a .csv file that contains 26 fields of mixed data.  If I open two files (letter with 5 fields pulled from csv file, and an envelope with 6 fields) the first file will print. If the 1st file remains open, the 2nd file will print. If the 1st file is closed after printing, the 2nd file no longer sees the data connection.  Closing and reopening Writer seems to correct the issue. 
I can provide the documents if needed.
Thank you.

Steps to Reproduce:
1. Open 2 documents.
2. Print 1st document.
3. Close 1st document.
4. Print 2nd document.
5. 2nd doc can't see data source
4. Close Writer and reopen.
5. Open and print 2nd doc.
6. It works.

Actual Results:
It worked

Expected Results:
Each file should see the data connection independently.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.8.1 (x64) / LibreOffice Community
Build ID: e1f30c802c3269a1d052614453f260e49458c82c
CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Dieter 2022-03-27 13:13:33 UTC
David thank you for reporting the bug. It seems you're using an old version of LibreOffice. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?

Please also add the documents, if bug is present in LO fresh.

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 David 2022-03-27 18:30:25 UTC
Created attachment 179145 [details]
data source

It should sit in your downloads folder for the test
Comment 3 David 2022-03-27 18:32:54 UTC
Created attachment 179147 [details]
file that uses data source

Envelope uses the data source for addresses.
Comment 4 David 2022-03-27 18:39:27 UTC
Created attachment 179148 [details]
file that uses data source

On my system, I have the 2 odt files in a directory in my documents folder called "CCSA cards".  The csv file is located in my downloads directory (called "downloads").
Comment 5 David 2022-03-27 18:40:51 UTC
I've included the files.  I did test with the new version and I get same result.
Comment 6 Buovjaga 2022-12-21 11:39:34 UTC
(In reply to David from comment #0)
> Description:
> I have a .csv file that contains 26 fields of mixed data.  If I open two
> files (letter with 5 fields pulled from csv file, and an envelope with 6
> fields) the first file will print. If the 1st file remains open, the 2nd
> file will print. If the 1st file is closed after printing, the 2nd file no
> longer sees the data connection.  Closing and reopening Writer seems to
> correct the issue. 
> I can provide the documents if needed.
> Thank you.
> 
> Steps to Reproduce:
> 1. Open 2 documents.
> 2. Print 1st document.
> 3. Close 1st document.
> 4. Print 2nd document.
> 5. 2nd doc can't see data source
> 4. Close Writer and reopen.
> 5. Open and print 2nd doc.
> 6. It works.

Is printing really required? Do you see the same issue when saving as document(s)? I can't test printing right now (sadly it does not offer to print to a file), but your files worked fine when saving as a document.

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8389048cb41291917449e87b2901d6133bce3373
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 21 December 2022
Comment 7 Buovjaga 2022-12-21 16:40:48 UTC
David sent me a direct email, which seems to confirm that our results are different:

I can easily reproduce the issue. I have several documents that access the data source.  When I close one, the other doesn't see the data source. In fact, I don't even get to the print window when I reproduce the issue. It doesn't matter whether you actually print or not.
If you want to try and reproduce it, create a spreadsheet with data you would use for a mail merge. Create a document and use the wizard to create a connection to the spreadsheet. Save the document. Open it again. Create a second document and insert some fields in both documents that pull data from the spreadsheet as if you are creating a mailing envelope or mail merge letter. Save and close the documents, then reload them. Select the printer on the tool bar. It should open the dialog (say yes) and then open the data connection window. When both documents are open the connection will pull data from the spreadsheet. Close one and the connection is no longer available.

I have updated to the latest stable version and reproduced the error twice now.  If you can't reproduce the error, I have no explanation for that. I am able to reproduce it repeatedly. The workaround is to leave both documents open, but there still seems to be an unresolved bug.
Comment 8 Dieter 2023-12-23 19:02:02 UTC
Tested with

Version: 24.2.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 5f390384195b7264c6e52add9e90a39790285249
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

But I failed to test (perhaps I'm not familiar enough with mail merge)

My steps:
1. Download attachment 179145 [details]
2. Open attachment 179147 [details] (envelope.odt) and attachment 179148 [details] (member letter.odt)
3. In document "member letter" Strg+P => Message "Your document contains address database fields. Do you want to print a form letter?"
4. Yes => Message "The file file:///C:/Users/Downloads/memberlist.csv could not be loaded. at C:/cygwin64/home/buildslave/source/libo-core/connectivity/source/commontools/dbexception.cxx:403"
5. ?????

David can you add the correct steps?
Comment 9 David 2023-12-23 21:04:31 UTC
Created attachment 191579 [details]
A writer document detailing how I set up and use the mail merge function.

I have recently updated the documents I use with the mail merge function.  Do you want new files?  How can I send multiple files to you?
Comment 10 Buovjaga 2023-12-24 07:04:45 UTC
(In reply to David from comment #9)
> Created attachment 191579 [details]
> A writer document detailing how I set up and use the mail merge function.
> 
> I have recently updated the documents I use with the mail merge function. 
> Do you want new files?  How can I send multiple files to you?

You attach multiple files one by one.
Comment 11 David 2023-12-24 15:15:15 UTC
Created attachment 191585 [details]
file that uses mail merge
Comment 12 David 2023-12-24 15:15:59 UTC
Created attachment 191586 [details]
file that uses mail merge
Comment 13 David 2023-12-24 15:18:33 UTC
Created attachment 191587 [details]
a file that uses mail merge