]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/bestlink_change_update_issue.mdwn
(no commit message)
[ikiwiki.git] / doc / bugs / bestlink_change_update_issue.mdwn
1 * Has bugs updating things if the bestlink of a page changes due to
2   adding/removing a page. For example, if Foo/Bar links to "Baz", which is
3   Foo/Baz, and Foo/Bar/Baz gets added, it will update the links in Foo/Bar
4   to point to it, but will forget to update the backlinks in Foo/Baz.
5
6   The buggy code is in `refresh()`, when it determines what
7   links, on what pages, have changed. It only looks at
8   changed/added/deleted pages when doing this. But when Foo/Bar/Baz
9   is added, Foo/Bar is not changed -- so the change it its
10   backlinks is not noticed.
11
12   To fix this, it needs to consider, when rebuilding Foo/Bar for the changed
13   links, what oldlinks Foo/Bar had. If one of the oldlinks linked to
14   Foo/Baz, and not links to Foo/Bar/Baz, it could then rebuild Foo/Baz.
15
16   Problem is that in order to do that, it needs to be able to tell that
17   the oldlinks linked to Foo/Baz. Which would mean either calculating
18   all links before the scan phase, or keeping a copy of the backlinks
19   from the last build, and using that. The first option would be a lot
20   of work for this minor issue.. it might be less expensive to just rebuild
21   *all* pages that Foo/Bar links to.
22
23   Keeping a copy of the backlinks has some merit. It could also be
24   incrementally updated.
25
26 * And if Foo/Bar/Baz is then removed, Foo/Bar gets a broken link,
27   instead of changing back to linking to Foo/Baz.
28
29 This old bug still exists as of 031d1bf5046ab77c796477a19967e7c0c512c417.