dokufreaks / plugin-include

A DokuWiki plugin for including other wiki pages into the current one.
http://www.dokuwiki.org/plugin:include
GNU General Public License v2.0
62 stars 54 forks source link

Nested includes - wrong page links & titles #279

Open pparik opened 2 years ago

pparik commented 2 years ago

First of all, thank you for an excellent plugin!

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

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

Here is the plugin configuration I use: config

ternite commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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