From 684cd73a79405ee58e115e603213c39a33d710cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 14 Feb 2009 03:01:35 -0500 Subject: [PATCH] downgrade missing shortcuts page error to warning and response to bug report --- IkiWiki/Plugin/shortcut.pm | 8 +++++--- ..._plugin_will_not_work_without_shortcuts.mdwn.mdwn | 12 ++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm index c1e6a7eb3..5693ee782 100644 --- a/IkiWiki/Plugin/shortcut.pm +++ b/IkiWiki/Plugin/shortcut.pm @@ -28,10 +28,12 @@ sub checkconfig () { $srcfile=srcfile("shortcuts.mdwn", 1); } if (! defined $srcfile) { - error(sprintf(gettext("shortcut plugin will not work without %s"), - "shortcuts.".$config{default_pageext})); + print STDERR sprintf(gettext("shortcut plugin will not work without %s"), + "shortcuts.".$config{default_pageext})."\n"; + } + else { + IkiWiki::preprocess("shortcuts", "shortcuts", readfile($srcfile)); } - IkiWiki::preprocess("shortcuts", "shortcuts", readfile($srcfile)); } } diff --git a/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn b/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn index 994929bfc..85844132d 100644 --- a/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn +++ b/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn @@ -6,3 +6,15 @@ On my initial ikiwiki -setup auto.setup, I get the following error: This is using the latest git pull of ikiwiki. I am not sure why it is not finding shortcuts.mdwn. -- [[JosephTurian]] + +> The error, and the weird paths suggest to me that you +> have installed ikiwiki in a strange way, and it is failing +> to find its basewiki underlay. The `$installdir` is +> hardcoded into IkiWiki.pm at build time, based on the PREFIX +> setting (see README). +> +> If that's not set right, you'll have other problems than just this one, +> so I suggest you check how you installed ikiwiki. +> +> Anyway, I've made the shortcut plugin only warn about this.. +> --[[Joey]] -- 2.44.0