Bug 512581

Summary: Export XSL Transform produces no output file.
Product: [Applications] tellico Reporter: Jeffrey Simonson <simonsonjh>
Component: generalAssignee: Robby Stephenson <robby>
Status: RESOLVED FIXED    
Severity: normal CC: simonsonjh
Priority: NOR    
Version First Reported In: 4.1.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 4.2
Sentry Crash Report:
Attachments: My XSL transform file I've used for many years.

Description Jeffrey Simonson 2025-11-25 06:34:43 UTC
Created attachment 187146 [details]
My XSL transform file I've used for many years.

SUMMARY
I have been using the XSL transform with a XSL file I wrote several years ago.  It's always been working perfectly.  But I recently installed Ubuntu 25.10 with Tellico 1.4.3.  My XSL file now does not produce an output file; also no useful errors on the command line or the log file.  xsltproc actually a proper transformation using my.xsl

STEPS TO REPRODUCE
1. Start Tellico
2. Open a movie collection
3. Select one movie
4. Click button: Export XSL Transform
5. Select: Export selected entries only (others not checked.
6. Select file my.xsl for XSLT file.
7. Click OK
8. Select output file.
9. Click Save

OBSERVED RESULT
1. No output file.

EXPECTED RESULT
1. A transformed output file.

SOFTWARE/OS VERSIONS
Ubuntu 25.10
Tellico 4.1.3

ADDITIONAL INFORMATION

Output from command line:
$ tellico --log --logfile tellico.log
[21:25:47] WARNING empty xslt file
Entity: line 1: parser error : Malformed declaration expecting version
<?xml UTF-8"?>
      ^
Entity: line 1: parser error : Blank needed here
<?xml UTF-8"?>
      ^
Entity: line 1: parser error : parsing XML declaration: '?>' expected
<?xml UTF-8"?>
      ^
-------------------------------------
tellico.log

[21:25:46] Starting Tellico "4.1.3" at "2025-11-24T21:25:46"
[21:25:46] Opening log file "tellico.log"
[21:25:46] Setting local image dir: "/home/simonsonjh/.local/share/tellico/data/"
[21:25:46] Setting max image cache cost: 67108864
[21:25:46] Setting max pixmap cache cost: 67108864
[21:25:46] Setting max icon cache cost: 1000
[21:25:47] Opening previous file: "/mnt/fff4e7cc-a5cf-45fb-a54c-fc8a9dd61c9e/MEGA/Tellico/Film.tc"
[21:25:47] Opening collection file: "/mnt/fff4e7cc-a5cf-45fb-a54c-fc8a9dd61c9e/MEGA/Tellico/Film.tc"
[21:25:47] WARNING empty xslt file
[21:25:48] Setting local directory to "/mnt/fff4e7cc-a5cf-45fb-a54c-fc8a9dd61c9e/MEGA/Tellico/Film_files/"
[21:25:48] Removing image from cache: "gradient_bg.png"
[21:25:48] Deleting image: "gradient_bg.png"
[21:25:48] Loading image from data: "gradient_bg.png"
[21:25:48] Removing image from cache: "gradient_header.png"
[21:25:48] Deleting image: "gradient_header.png"
[21:25:48] Loading image from data: "gradient_header.png"
[21:25:50] Setting temp image dir: "/tmp/tellico-gPzHUn/"
[21:25:50] Removing image from cache: "gradient_bg.png"
[21:25:50] Deleting image: "gradient_bg.png"
[21:25:50] Loading image from data: "gradient_bg.png"
[21:25:50] Removing image from cache: "gradient_header.png"
[21:25:50] Deleting image: "gradient_header.png"
[21:25:50] Loading image from data: "gradient_header.png"
[21:26:20] [ unknown:0  unknown ] XSLTHandler::applyStylesheet() - error parsing input string!
[21:26:26] Purging images from the temporary directory
[21:26:26] Setting local image dir: "/home/simonsonjh/.local/share/tellico/data/"
[21:26:26] Setting max image cache cost: 67108864
[21:26:26] Setting max pixmap cache cost: 67108864
Comment 1 Jeffrey Simonson 2025-11-25 19:39:47 UTC
It appears the files Tellico-generated XML files need a new first line.

Current, improper first line:
<?xml version="1.0"?>

Correct first line:
<?xml version="1.0" encoding="utf-8"?>
Comment 2 Robby Stephenson 2025-11-26 00:08:35 UTC
(In reply to Jeffrey Simonson from comment #1)
> It appears the files Tellico-generated XML files need a new first line.

Yeah, there's a change in the underlying Qt library that I need to figure out. Thanks for the bug report, I should have it fixed shortly.
Comment 3 Robby Stephenson 2025-11-26 01:45:03 UTC
(In reply to Robby Stephenson from comment #2)
> Yeah, there's a change in the underlying Qt library that I need to figure
> out. Thanks for the bug report, I should have it fixed shortly.

I was wrong, Tellico has had a long-standing bug that seems to have been exposed by more strict libraries.
Comment 4 Robby Stephenson 2025-11-26 01:45:18 UTC
Git commit 8561cdcf0b317be2aad9c63a6078d3109cd4ec4f by Robby Stephenson.
Committed on 26/11/2025 at 01:45.
Pushed by rstephenson into branch 'master'.

Use correct encoding string for locale XML export

Long-standing bug that seems to have been exposed by more strict recent
libxml2 updates.

The qt documentation actually warns against creating the declaration as
a processing instruction. Eventually, Tellico probably needs to just
assume UTF-8  everywhere.
FIXED-IN: 4.2

M  +4    -0    ChangeLog
M  +2    -2    src/exportdialog.cpp
M  +10   -0    src/tests/CMakeLists.txt
C  +28   -28   src/tests/xsltexportertest.cpp [from: src/translators/xsltexporter.h - 058% similarity]
C  +9    -29   src/tests/xsltexportertest.h [from: src/translators/xsltexporter.h - 067% similarity]
M  +1    -1    src/translators/tellicoxmlexporter.cpp
M  +8    -2    src/translators/xsltexporter.cpp
M  +5    -0    src/translators/xsltexporter.h

https://invent.kde.org/office/tellico/-/commit/8561cdcf0b317be2aad9c63a6078d3109cd4ec4f
Comment 5 Jeffrey Simonson 2025-12-06 10:51:40 UTC
Thanks for fixing this bug.  I have Tellico 4.2 running, and it is correctly making Kodi .nfo files again.