-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Search first
- I searched and no similar issues were found
What Happened?
When publishing a Logseq database-based graph, the generated HTML file contains malformed JavaScript that causes the published page to be blank in browsers.
Reproduce the Bug
- Use Logseq DB version 2102
- Create some pages with content and set publish all pages
- Use Logseq UI to publish (Export → Export Public Pages)
- Open the exported index.html file in a browser
- The page is blank and shows no content
Expected Behavior
The published HTML should display all pages and render correctly in the browser.
Files
Use my database to publish and push to https://github.com/zhangxueshan246/zhangxueshan246.github.io .
The page is blank and shows SQLiteDB error: Error: Cannot read properties of undefined (reading '$DB$')
Browser, Desktop or Mobile Platform Information
- Logseq version: from https://github.com/logseq/logseq/actions/runs/21748527923
- Graph type: Database
- Published site: https://github.com/zhangxueshan246/zhangxueshan246.github.io
- Browser: Chrome on Win 11
Additional Context
AI said:
- Looking at the HTML source, the
window.logseq_dbvariable is malformed:- Expected:
window.logseq_db="[logseq_DB,{...}]" - Actual:
window.logseq_db="[logseq____"~#datascript/DBlogseq____",[logseq____"^ logseq____",logseq____"~:schemalogseq____"...
- Expected:
The quotes are being mangled - " appears as literal text logseq____" in the output.
The serialization of the database to HTML is corrupting the quote characters. This needs to be fixed in the Logseq publish code for the DB version
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels