New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When :org-mode/insert-file-link is on links for page aliases are broken #9342
Comments
Hi There! 👋 We haven't seen any activity on this issue in a while 😴, and we just wanted to make sure that it's still relevant. If you're still experiencing this issue, you might find it helpful to update to the latest version of Logseq. The latest version includes bug fixes and new features that may help to resolve this issue, and you can download it from our website. If updating to the latest version doesn't help, please let us know by adding a comment 💬. We're here to help! If the issue has been resolved or is no longer relevant, that's great news! 🎉 Access additional Logseq 🚀 resources:
Thanks for your contributions to Logseq! If you have any other issues or feature requests, please don't hesitate to let us know. We always welcome pull requests too! |
This is still an issue. |
I'm working on a PR that might fix this as a side effect. We'll see... I'm currently stuck trying to get ruby installed on my MBP so I can test if I break the mobile app. I think based on what I'm seeing in your issue here and the unit test cases I wrote, it should be fine :) Hopefully if that works out, I should hopefully have it out sometime soon (next few days?). That being said, I've only written unit tests. Now that I think about it, I should add E2E tests... I'll have to play with that. |
I'm wrapping up what I think will be a draft PR. I just finished testing my changes on iOS (it took years off my life) and I have not written end-to-end tests (just unit), but I'll open the PR as My PR should solve these issues. I think there are a couple other issues that we might want to consider in the future regarding org-mode/roam aliases and Logseq, but for now given your reproduction steps it should be sufficient. The root of the problem is the incorrect parsing of file-paths due to buggy platform-specific path resolution for missing files which seems unnecessary in my testing. The non-compliant file url you are seeing ( We can discuss later, but here are some questions I have for future development:
Hopefully I can post my draft PR tonight or tomorrow. I'm happy to see that my fix should solve your issues. I have to run to a social event, but hopefully you'll see my PR soon. 👋 EDIT: I just realized that you're the person who created the |
Search first
What Happened?
When configured with
:org-mode/insert-file-link true
links to the same page are created differently if referred by title vs alias:[[Title]]
becomes[[file:../pages/Title.org][Title]]
[[Alias]]
becomes[[file:..//Users/user/logseq-home/pages/Alias.org][Alias]]
The second link is a broken link in other programs, since when expanded, it results into
/Users/user/logseq-home/Users/user/logseq-home/pages/Alias.org
.Reproduce the Bug
config.edn
to use:org-mode/insert-file-link? true
//
in there and search for the title of the page and add it in a block//
in there and search for the alias of the page and add it in another blockExpected Behavior
The resulting file link for the alias should be the same as the one for the title.
Screenshots
M1 macOS 13.3, Desktop App v0.9.4
Desktop or Mobile Platform Information
No response
Additional Context
No response
Are you willing to submit a PR? If you know how to fix the bug.
The text was updated successfully, but these errors were encountered: