Skip to content
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

Nested includes - wrong page links & titles #279

Open
pparik opened this issue Feb 14, 2022 · 3 comments
Open

Nested includes - wrong page links & titles #279

pparik opened this issue Feb 14, 2022 · 3 comments

Comments

@pparik
Copy link

pparik commented Feb 14, 2022

First of all, thank you for an excellent plugin!

I have discovered two (probably related) annoying bugs with nested includes:

  • page id is shown instead of page title (this can be corrected by using :start at the end of the link instead of only:)
  • page link is wrong, for example test:start#plugin_include__test__2__1__start instead of test:2:1:start

Please see the commented minimum working example: test.zip (to be extracted to /data/pages).

Here is the plugin configuration I use:
config

@ternite
Copy link

ternite commented Apr 26, 2022

I came here to report a bug converning your findings with the second bullet point: "page link is wrong"

There are two things to consider:

  1. (NOT THE BUG) The include plugin acts smart. I believe this is not a bug you observed. Two Assumptions:
    1. You have an included page that contains a page link. The link target is another page that contains a heading.
    2. This referred page is included within your including page, too.

RESULT: The page link will not point to the page your internal link points to, but to the section within the including page that contains said heading. The heading acts as a page-internal link target, and the internal link is rewired to point to the page-internal heading, not to the original page.

I don't think this behavior is useful in all dokuwiki instances (including mine), but it's a valid functionality.

  1. (THE BUG) When exporting such a link to ODT, the result is an empty output. Not even an external anchor with no content, but literally no output.

@ternite
Copy link

ternite commented Apr 27, 2022

Concerning the 2. thing (THE BUG): that simply was missing functionality. I added an export output for ODT in this pull request.
Only caveat is: it adds the code to insert an external link to the wiki page, not to the internal heading within the ODT file.

@pparik
Copy link
Author

pparik commented Feb 28, 2023

Is there any hope for a fix to the page link problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants