]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/permalink_not_set_for_comments.mdwn
followup
[git.ikiwiki.info.git] / doc / bugs / permalink_not_set_for_comments.mdwn
1 Changes to comments result in notifyemail sending emails with broken urls like 
2 "http://whatever/foo/comment_1_10a49d69282155c5c3e66dc58f64f956/"
4 notifyemail uses meta permalink if set, so it must not be set for comment
5 pages.
7 In the comments plugin, there's this code, which is supposed to set
8 permalink:
10         if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
11                 $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page})).
12                         "#".page_to_id($params{page});
13         }
15 `comments_pagename` is `comment_` so the above code needs a comment page to contain
16 two underscores. I think that is the root of the bug. --[[Joey]]
18 > Removed the trailing underscore in the regexp, so it should be fixed,
19 > though I have not tested the fix. Leaving this bug open until it's
20 > confirmed fixed. (I deployed it to branchable.)
21
22 > This will only fix the stored permalink metadata for a comment when its get
23 > preprocessed again, not immediately. That's ok for notifyemail,
24 > but other uses of permalink might need a wiki rebuild to get the bug fix.
25 > --[[Joey]]