Bug 380805 - Generating Gallery: "Could not load XSL file"
Summary: Generating Gallery: "Could not load XSL file"
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-HTMLGallery (show other bugs)
Version: 5.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-04 09:50 UTC by Kurpfaelzer
Modified: 2017-06-11 20:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kurpfaelzer 2017-06-04 09:50:04 UTC
First of all: digikam is a great piece of software and I thank all developers of that.

I was very happy about the fact that it is possible again to create HTML-Galleries. Unfortunatelly, every time I  try to create a gallery, the generating process ends with the message, that the XSL file could not be loaded.

Attached you will find the output of the generating process.

11:39:26 :: Starting to generate gallery...
11:39:26 :: 1 albums to process:
11:39:26 :: X:\blabla.JPG
11:39:26 :: Output directory: C:\Users\xxxxx\Pictures\Galery
11:39:26 :: Create directories
11:39:26 :: Copying theme
11:39:27 :: Generate images and XML files
11:39:27 :: Create directories
11:39:27 :: Create directories
11:39:27 :: Generating files for "blabla-dir"
11:39:50 :: Generating HTML files
11:39:50 :: Could not load XSL file '/C:/Program Files/digiKam/data/digikam/themes/elegant//template.xsl'

This failure doesn't depend on the type of gallery nor on the location where the gallery should be saved.

kind greetings from Stephan
Comment 1 caulier.gilles 2017-06-04 10:32:11 UTC
Look like the path is wrong :

'/C:/Program Files/digiKam/data/digikam/themes/elegant//template.xsl'

... it start with "/" like under Linux path. There is a bug in source code...

Can you confirm that 'C:/Program Files/digiKam/data/digikam/themes/elegant//template.xsl" file exist in your system ?

Gilles Caulier
Comment 2 Maik Qualmann 2017-06-04 10:40:01 UTC
Git commit 0c1c206a5b6c5f7f15a04b08ed00651f2c640049 by Maik Qualmann.
Committed on 04/06/2017 at 10:38.
Pushed by mqualmann into branch 'master'.

fix path to XSL file under windows

M  +1    -1    utilities/assistants/htmlgallery/generator/gallerygenerator.cpp
M  +1    -1    utilities/assistants/htmlgallery/generator/gallerytheme.cpp

https://commits.kde.org/digikam/0c1c206a5b6c5f7f15a04b08ed00651f2c640049
Comment 3 Maik Qualmann 2017-06-04 10:41:17 UTC
I do not close this bug yet because not tested under Windows.

Maik
Comment 4 Kurpfaelzer 2017-06-04 10:43:19 UTC
Thank you for your quick answer.

Indeed, it seems that the description of the path is wrong. Not onyl the slash in front of the drive letter, but also the double-slash before the xsl-file.

The requested path exists and the xsl-file is stored in it.

Stephan
Comment 5 caulier.gilles 2017-06-04 11:01:46 UTC
I start to rebuild the windows installer now. There will be updated in one hour.

Gilles Caulier
Comment 6 caulier.gilles 2017-06-04 12:42:14 UTC
Installer build is done. Uploading in GDrive under progress :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 7 Kurpfaelzer 2017-06-04 14:50:26 UTC
Many thanks for your correction.

The Gallery vould be cerated and it works!

BUT!!!!
All files and folders within the specified directory are obviously deleted before.
Because I specifid my Pictures-folder, everything is deleted (and could't be found anywhere). This is really a great pitty!

Stephan
Comment 8 caulier.gilles 2017-06-04 16:57:14 UTC
You want mean the target directory used to export the gallery ? Yes, this must be a temporary area.

You are right. We must fix this behavior.

Gilles Caulier
Comment 9 Maik Qualmann 2017-06-04 18:01:10 UTC
Strangely we remove only recursively the theme directory. So that the copy does not fail. So even if the directory (pictures) contains all the images, nothing is deleted.

Maik
Comment 10 Kurpfaelzer 2017-06-04 19:43:58 UTC
The original pictures are placed in directory X:\
The output directory was set to : C:\Users\xxxxx\Pictues\

Everything which was placed in this output directory before was deleted.
The pictures in the source directory are all well.

The galery was created afterwards and everything which belongs to the galery was placed perfectly.

The error is that all things which are already in the target directory are deleted without any warnings. There is also no comment, that one should use a temporary directory.
Comment 11 Maik Qualmann 2017-06-04 20:12:55 UTC
Git commit b576e320fe571afde7026d18dce84c3d06e6ff62 by Maik Qualmann.
Committed on 04/06/2017 at 20:11.
Pushed by mqualmann into branch 'master'.

remove only the theme dir in the destination URL
FIXED-IN: 5.6.0

M  +2    -1    NEWS
M  +2    -4    utilities/assistants/htmlgallery/generator/gallerygenerator.cpp
M  +1    -1    utilities/assistants/htmlgallery/generator/gallerytheme.cpp

https://commits.kde.org/digikam/b576e320fe571afde7026d18dce84c3d06e6ff62
Comment 12 Kurpfaelzer 2017-06-11 06:51:26 UTC
@Gilles:
just a short question: have you had a chance already to check Maiks fixes and to rebuild the windows installer? If so, I would try out the fix in a sandbox whether it will work now.

THX in advance
Stephan
Comment 13 caulier.gilles 2017-06-11 11:08:04 UTC
The patch is already included in source code and Windows installer re-build :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 14 Kurpfaelzer 2017-06-11 20:10:09 UTC
@all:
THX a lot. The creation of a HTML Gallery is currently working without deleting any other directories or files within the target directory.
Thank you for your great work.

Just for you as an information:
if you're creating a second or more additional gallery in the same target directory, the "index.html" file will point only to the last created gallery. The galleries created before are hard to access afterwards.
Perhaps, this might be a good idea for the improvement of this great feature.

Kind greetings, Stephan