Bug 376134

Summary: Export collection in HTML does not work
Product: [Applications] tellico Reporter: chp321
Component: generalAssignee: Robby Stephenson <robby>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 3.0.1
Sentry Crash Report:

Description chp321 2017-02-07 12:18:00 UTC
When exporting a collection in HTML, with "Export individual entry files", the relative path to them is broken. It does not point to the right directory.
For example, if you export the collection to point.html with option "Export individual entry files", in file point.html, individuals entries point to
"/individual-entry.html"
instead of
"point_files/individual-entry.html"
So, when you want to access to the individual entry in html page, you have "ERR_FILE_NOT_FOUND" message.
Comment 1 chp321 2017-02-07 12:33:00 UTC
Plus, tellico2html.js is not generated, and thus, is missing.
Comment 2 chp321 2017-02-07 12:50:09 UTC
I returned back to version 2.3.9 of tellico, and export in html, with individual entries is working fine.
Comment 3 Robby Stephenson 2017-02-09 01:47:59 UTC
Git commit 9dac9ef56e7bdceef9327ec8375c52fe1d369ea0 by Robby Stephenson.
Committed on 09/02/2017 at 01:45.
Pushed by rstephenson into branch 'master'.

Fix relative file locations in HTML export

This was another problem relative to the KURL->QUrl transition dealing
with relative urls and invalid links.

Add another unit test for the HTML export to verify appropriate relative
links, including checkmark pics and image files.
FIXED-IN: 3.0.1

M  +4    -0    ChangeLog
M  +-    --    src/tests/data/with-image.tc
M  +66   -1    src/tests/htmlexportertest.cpp
M  +2    -0    src/tests/htmlexportertest.h
M  +37   -41   src/translators/htmlexporter.cpp
M  +5    -0    src/translators/htmlexporter.h

https://commits.kde.org/tellico/9dac9ef56e7bdceef9327ec8375c52fe1d369ea0
Comment 4 chp321 2017-02-13 09:17:45 UTC
I apologize for my poor english, I am french.
Thank you for your job ! It partially resolved the bug : individual entries are now  well viewed, except images.
For example, the link toward a image is :
"/97ef4c491446512bd954946db57cd8d5.jpeg"
instead of
"point_files/97ef4c491446512bd954946db57cd8d5.jpeg"
So relative path to images must be fixed.

Plus, there is another bug : it exports visible fields only, even when you don't check the box «Export visible fields only»
Comment 5 chp321 2017-02-13 10:16:53 UTC
(In reply to chp321 from comment #4)
> I apologize for my poor english, I am french.
> Thank you for your job ! It partially resolved the bug : individual entries
> are now  well viewed, except images.
> For example, the link toward a image is :
> "/97ef4c491446512bd954946db57cd8d5.jpeg"
> instead of
> "point_files/97ef4c491446512bd954946db57cd8d5.jpeg"
> So relative path to images must be fixed.
> 
> Plus, there is another bug : it exports visible fields only, even when you
> don't check the box «Export visible fields only»

Sorry, forget the last two lines, it is not a bug, I misunderstood the feature.
It just remains the bug about the wrong relative path toward images in individual entries of HTML exported datas.
Comment 6 Robby Stephenson 2017-02-19 01:55:21 UTC
Git commit 189130df8515b6e4342aa1b4a390547a14a26cf1 by Robby Stephenson.
Committed on 19/02/2017 at 01:52.
Pushed by rstephenson into branch 'master'.

Use correct dir for img links in HTML export with relative entry files

A problem lingering from the port from KURL::relativePath, when using
QDir::relativeFilePath doesn't resolve the path. Switch to using
QFileInfo to grab the dir and then resolve the relative path from there

My thanks to chp321@gmail.com for the diligence in verifying the fix.

M  +32   -0    src/tests/htmlexportertest.cpp
M  +22   -2    src/translators/htmlexporter.cpp
M  +1    -0    src/translators/htmlexporter.h

https://commits.kde.org/tellico/189130df8515b6e4342aa1b4a390547a14a26cf1