logseq icon indicating copy to clipboard operation
logseq copied to clipboard

Page alias not working in published graph

Open MrVPlusOne opened this issue 3 years ago • 2 comments
trafficstars

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: image

Outside references: image

Reproduce the Bug

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

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

MrVPlusOne avatar Feb 07 '22 07:02 MrVPlusOne

Hi. Could you try 0.8.8? This is working for me on the latest version

logseq-cldwalker avatar Oct 14 '22 12:10 logseq-cldwalker

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: image

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 avatar Oct 14 '22 23:10 MrVPlusOne

@MrVPlusOne Unfortunately I can't reproduce this. Hovering over the alias of a page isn't blank for me Screen Shot 2022-10-21 at 3 47 55 PM Can you provide the example page that has the alias and the example blocks that have the referenced alias page?

logseq-cldwalker avatar Oct 21 '22 19:10 logseq-cldwalker

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

tzcl avatar Feb 11 '23 22:02 tzcl

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.

tomtung avatar Mar 17 '23 23:03 tomtung