zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.18k stars 1.9k forks source link

Problem with Bulk export #1938

Closed mursilsayed closed 3 years ago

mursilsayed commented 3 years ago

Trilium version 0.46.6 , Running on MacOs BigSur version 11.3.1 trilium-2021-05-13.log

I was trying export one of my folder which contains my research documents on a topic. When I tried exporting the folder in html(and markdown) format by selecting this note and all of its descendants, some of my notes were not exported and were showing blank page. I tried exporting the same note using the option only this note without its descendants and it was exported correctly.

I did some experiments to see what is causing the bulk export to fail while the single page export is working fine. My research indicated the following problems.

1. Double Hyphens

If I am using double hyphen -- anywhere in the note, the note will not be exported using the bulk export functionality.

Example:

– used anywhere in the note or in links e.g. Project Reactor — Reactive Programming With Spring, Part 2

2. RIGHT SINGLE QUOTATION MARK

’ used anywhere in the code Example#1:

Example#2

It’s an evolution of Infrastructure as Code (IaC) and a DevOps best practice that leverages Git as the single source of truth, and control mechanism for creating, updating, and deleting system architecture.

3. LEFT DOUBLE QUOTATION MARK or RIGHT DOUBLE QUOTATION MARK

“ used anywhere in the note

Example: Test “Mursil Sayed”

Example#2

“The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, relearn and unlearn.” - Alwin Toffler

There may be other especial characters that may also cause bulk export to fail, but I was able to make the bulk export run successfully after removing the above mentioned especial characters and double hyphens from my notes. Although I did the initial testing on version 0.46.6, the problem is present in the latest version(0.47.2) as well.

Linked Issue : #1883

zadam commented 3 years ago

Hi, thanks for the investigation. This is extremeley weird since the generated files are readable using unix ZIP tools, but on Windows and Macs they show up corrupted. I will probably need to replace the compression library yazl for something else and hope it will fix this issue ...

zadam commented 3 years ago

I implemented new ZIP export using archiver and initial testing shows that there are no checksum errors on windows.

mursilsayed commented 3 years ago

The issue that I posted still persist. I was not having any checksum errors. You can easily reproduce the issue using the steps described above.

zadam commented 3 years ago

Should be fixed in 0.47.4