logseq
logseq copied to clipboard
Page alias not working in published graph
What happened?
Hi, I noticed that alias references seem broken in the exported graph (when viewing inside a browser), as shown in the following two examples. They just resolve to an empty page.
Within the original page:

Outside references:

Reproduce the Bug
- Publish any page with an
alias::property. - Export the graph into HTML and open it using a browser.
- Navigate to that page.
- Hover preview or click on the alias reference, like shown below

Expected Behavior
The alias should work like in the desktop app.
Screenshots
No response
Desktop Platform Information
- OS: macOS 12.1
- Browser Chrome 97.0.4692.99 (Official Build)
- Version: Version 0.5.9 (0.5.9), nightly build.
Mobile Platform Information
No response
Additional Context
No response
Hi. Could you try 0.8.8? This is working for me on the latest version
Hi. Could you try 0.8.8? This is working for me on the latest version?
Weirdly, it's still not working on my computer as shown below:

I'm using 0.8.8 nightly build on MacOS, and I have tested it in both Chrome and Safari with the same result.
@MrVPlusOne Unfortunately I can't reproduce this. Hovering over the alias of a page isn't blank for me
Can you provide the example page that has the alias and the example blocks that have the referenced alias page?
I'm also encountering this issue. To add more info, if all pages are marked public for export then the alias works fine. The problem occurs when not all pages are exported.
For an example, see https://notes.tzcl.me/#/page/andy%20matuschak vs https://notes.tzcl.me/#/page/andy
It appears that the published public subgraph isn't working as expected in various contexts, including page links, tag links, and aliases, as we can see here.
For instance, suppose a public page [[A]] is linked to (or tagged with) a non-public page [[B]] (or #B). In that case, when we click through from [[A]] to [[B]] in the exported graph, [[B]] is rendered as a completely empty and dysfunctional page instead of showing [[A]] as one of its linked references.
This makes publishing a fully "functional" public subgraph very tedious, as we need to ensure that we materialize a page file for everything that's linked, tagged, or used as an alias in a public page, then explicitly mark every such page file as public.
A more robust general solution might be to treat anything non-public referenced by a public page, be it aliases, tags, or other pages, as empty pages, and then index and render them accordingly. However, I'm unsure of how much work this solution would require.