Bug 116555 - Create HTML document(s) via Send yields anchor document with wrong extension
Summary: Create HTML document(s) via Send yields anchor document with wrong extension
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0 target:6.0.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-03-21 23:41 UTC by Gerhard Weydt
Modified: 2018-04-11 16:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test XHTML/HTML documents (14.22 KB, application/x-zip-compressed)
2018-03-23 11:35 UTC, Gerhard Weydt
Details
test documents new version (21.19 KB, application/x-zip-compressed)
2018-03-25 18:19 UTC, Gerhard Weydt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Weydt 2018-03-21 23:41:31 UTC
Creating a set of web documents using Send -> Create HML Document does, in contrast to earlier releases, result in a start document which doesn't work.
Take (in LibO version 6.0.2.1, I haven't tested earlier versions after 5.2) a writer document which contains at least one heading of level 1. Choose File -> Send -> Create HTML Document The styles setting then should be "Outline: Level 1"; if not, select it; this is not crucial, but perhaps necessary for the document to be created. Enter a file name "xxx" and save.
More or less files starting with "xxx" will be created, the start file will be xxx.xhtml. Now this file causes problems: opening it yields an error message, which obviously is a result from its first line being incompatible with the extension xhtml. This extension is new: in version 5.2 the extension was htm, which worked. If, for the file created with version 6.0, you change the extension to htm or html, as it was in earlier releases, or set it when creating the file, it still works.
So the problem seems to be that the start file for all the detail web pages has the wrong extension (or the specification in the first line is incorrect, I cannot judge that).
Comment 1 Gerhard Weydt 2018-03-22 00:18:40 UTC
opening file causes problems as follows:
Firefox: error message
MS Explorer: empty result
These presentation issues vanish when changing the extension to .html or .htm
Comment 2 Regina Henschel 2018-03-22 01:40:31 UTC
Filename extension does not fit to doctype.

It was OK in Version: 6.0.0.0.alpha1+ (x64)
Build ID: a5af0fd9f27af42cf2e8571f659cdad6e606215b
CPU threads: 8; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-07_00:30:02
Locale: de-DE (de_DE); Calc: CL
Comment 3 Xisco Faulí 2018-03-23 10:16:16 UTC
Could you please attach the original file?

I can't reproduce it in

Version: 6.1.0.0.alpha0+
Build ID: 234d0368c823eb1a74e973e051ac522e6b86e833
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

The generated html file can be open in firefox correctly.
Comment 4 Gerhard Weydt 2018-03-23 11:35:34 UTC
Created attachment 140827 [details]
test XHTML/HTML documents

In reply to comment 3 I added the attachment "test XHTML/HTML documents", a zipped folder. It contains a hardcopy of the error and the two documents created from a writer document containing one heading and one text line. One is HTML, you can open it in Firefox, it contains the only page of the document. The other is XHTML, which produces the error. It contains the overview with links to the pages of the document. If I change the extension to html, it works and shows one line containing the link "heading". Clicking on it opens the HTML document named above.

I created the documents with:
Version: 6.0.2.1
Build-ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
It'a 32-bit installation, Windows is 64 Bit.
Comment 5 Xisco Faulí 2018-03-25 15:26:09 UTC
Hi Gerhard,
thanks for the document.
Could you please also attach the .ODT file from where the xhml is created?
Comment 6 Gerhard Weydt 2018-03-25 18:19:30 UTC
Created attachment 140876 [details]
test documents new version

answering comment #5: I had not saved the source document, and I realized that I had perhaps already changed the extension to html.
So I added a new zipped file containing the source .ods, the two created files .xhtml and .html and the screenshot of the error message resulting from opening testSend.xhtml. If you change the extension of this file to .html, it works.
The old attachjment should no longer be visible because it was marked obsolete.
Comment 7 Xisco Faulí 2018-03-28 09:19:33 UTC
Ok, so taking testSend.odt, If I go to File - Send - Create HTML document it creates a valid html file which I can open with Firefox

Version: 6.1.0.0.alpha0+
Build ID: fc88892e9964554d4440637e11a7325c4200fedf
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Is there any extra step I have to perform in order to reproduce the issue ?
Comment 8 Regina Henschel 2018-03-28 10:17:04 UTC
Please examine the output of the operation. I get two files. One is myname.xhtml and the other is myname1.html. And the file with the .xhtml file name extension is the bad one.
Comment 9 Xisco Faulí 2018-03-28 11:50:37 UTC
i get two files, but both are html files

-rw-rw-r-- 1 xisco xisco 1048 mar 28 13:49 output.html
-rw------- 1 xisco xisco 1015 mar 28 13:49 output1.html
Comment 10 Regina Henschel 2018-03-28 13:03:26 UTC
I'm on Windows 10. Perhaps that is the difference?
Comment 11 Gerhard Weydt 2018-03-28 15:59:26 UTC
For me it's the same situation as for Regina, as you already saw in the attachment. I tested it again in 6.1:
Version: 6.1.0.0.alpha0+
Build ID: 0869602fdfb48ff133338915d210e2190772feef
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-26_23:45:36
Locale: de-DE (de_DE); Calc: group
witht the same result. But, as Regina said, I'm on Windows 10.
Comment 12 Xisco Faulí 2018-03-28 20:19:41 UTC
Reproduced in

Version: 6.1.0.0.alpha0+
Build ID: 751191ed2d7d6af6eddc3d738e8c45b0a2ab2572
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-21_23:24:05
Locale: es-ES (es_ES); Calc: group

thus, win only...
Comment 13 Xisco Faulí 2018-03-29 10:09:44 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2017-12-13 11:13:40 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-12-14 09:09:59 +0100
commit 14daba5bd0ba64ff53ad98de7a84537ff03024ea (patch)
tree ae8d2369a97834662b54401d384abd2e571fcd0e
parent b2b1debf06589bd91e437df47a2904574aaae316 (diff)
Related: tdf#114428 filter: associate .xhtml with HTML import
Since there is no XHTML import; and this way the expensive "deep"
detection (that calls into all the DLP libs, etc) can be avoided.

Times for a hello world input: 56 -> 23 ms is spent in
Desktop::loadComponentFromURL() (41% of original).

Bisected with: bibisect-win32-6.1

Adding Cc: to Miklos Vajna
Comment 14 Commit Notification 2018-04-10 08:59:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=87e7fd163bc587b5c7cbb59ba40a9856f8bb225d

tdf#116555 filter: make sure default extension for HTML is not .xhtml

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Xisco Faulí 2018-04-11 11:20:26 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: f966767e1ccfa432da33e1a0fd6de69e17a36bc3
CPU threads: 16; OS: Windows 6.3; UI render: default; 
Locale: en-GB (en_GB); Calc: group
Comment 16 Commit Notification 2018-04-11 16:36:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3925ee114d551567a106161d9e747318ab60c6f&h=libreoffice-6-0

tdf#116555 filter: make sure default extension for HTML is not .xhtml

It will be available in 6.0.4.

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

Affected users are encouraged to test the fix and report feedback.