aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-09 16:00:12 -0400
committerJoey Hess <joey@kitenet.net>2010-06-09 16:00:12 -0400
commite96cf38eccd219714140f221090d2e7751fd4ee0 (patch)
treeeec9569699ea73555f3146b5bae745030fff6358 /doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn
parent2eefd84d0adbcaaaf4aa1c306a1c745fa52f3c9b (diff)
downloadikiwiki-e96cf38eccd219714140f221090d2e7751fd4ee0.tar
ikiwiki-e96cf38eccd219714140f221090d2e7751fd4ee0.tar.gz
When editing a page, show that page's sidebar. (Thanks, privat)
Diffstat (limited to 'doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn')
-rw-r--r--doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn19
1 files changed, 18 insertions, 1 deletions
diff --git a/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn b/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn
index 58cf9d737..2ef5cdba3 100644
--- a/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn
+++ b/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn
@@ -18,6 +18,12 @@ But it causes some nasty bugs for plugins that use the pagetemplate hook. It is
* -> Problem: 404, the browser goes to "/bar/foo"
* -> Was expected: the browser goes to "/foo"
+> You must have a locally modified `page.tmpl` that omits the "TMPL_IF DYNAMIC"
+> that adds a `<base>` tag. That is needed to make all links displayed by
+> cgis work reliably. Not just in this page editing case.
+> The [[version_3.20100515]] announcment mentions that you need to
+> update old `page.tmpl` files to include that on upgrade. --[[Joey]]
+
### A second example
* create "/bar/sidebar.mdwn" with "world"
@@ -28,6 +34,10 @@ But it causes some nasty bugs for plugins that use the pagetemplate hook. It is
* -> Problem: the sidebar now shows the foo link (it is the root sidebar!)
* -> Was expecte : the sidebar displays "world"
+> One could argue that the behavior here is right, or wrong.
+> Is a page edit page really the same as the page being edited?
+> The next case is more clear.. --[[Joey]]
+
### A last example
* with the web browser edit the page "bar"
@@ -36,6 +46,8 @@ But it causes some nasty bugs for plugins that use the pagetemplate hook. It is
* -> Problem: the sidebar still displays the foo link
* -> Was expected: the sidebar display "goodby"
+> I think this is worth fixing. --[[Joey]]
+
## Some superficial hacking
With the following workaround hacks, I manage to solve the 3 examples shown above:
@@ -47,4 +59,9 @@ With the following workaround hacks, I manage to solve the 3 examples shown abov
<pre>my %params=@_;
shift->(page => $params{page}, destpage => $params{destpage}, template => $template);</pre>
-I do not guarantee (I do not even expect) that it is the proper way to solve this bug but it may help developers to find and solve the real problem.
+I do not guarantee (I do not even expect) that it is the proper way to solve
+this bug but it may help developers to find and solve the real problem.
+
+> Oh, it's pretty reasonable. I don't think it breaks anything. :)
+> [[done]]
+> --[[Joey]]