Handle s non-existent pages by redirecting to index sub-page if available; otherwise showing sub-pages and/or displaying Search Results
Compatible with DokuWiki
Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky
Handle s non-existent pages by redirecting to index sub-page if available; otherwise showing sub-pages and/or displaying Search Results
The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on dokuwiki.org. Recommended are public repository hosts like GitHub, GitLab or Bitbucket.
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to 404manager, autostart
This plugin is no longer available. It has been superseded by https://www.dokuwiki.org/plugin:whennotfound
If the site visitor requests a non-existent page, autosearch pluging will kick in to show the following:
:folder:index
page exists but :folder
page does not exist, and a visitor requests the :folder
page, he/she will be automatically redirected to :folder:index
page. The names of index subpages can be specified in the configuration manager.zip file is not ok at all:
autosearch
, open zipfile with an unzipper, select the files in the folder and unzip only these to your created folder.You need to apply this patch to get latest indexmenu releases work:
diff -urN /tmp/autosearch/action.php ./autosearch/action.php --- /tmp/autosearch/action.php 2007-07-03 12:15:00.000000000 +0200 +++ ./autosearch/action.php 2008-08-27 18:40:35.000000000 +0200 @@ -41,7 +41,7 @@ die(); } } - if($this->getConf('pagelist') && is_dir(dirname(wikiFN("$ID:dummy"))) && $indexmenu =& plugin_load('syntax', 'indexmenu')){ + if($this->getConf('pagelist') && is_dir(dirname(wikiFN("$ID:dummy"))) && $indexmenu =& plugin_load('syntax', 'indexmenu_indexmenu')){ $handled = $indexmenu->handle("{{indexmenu>$ID#2|js#default}}",null,nul l,$this); $dummy_renderer = (object) array('doc'=>''); $indexmenu->render('xhtml',$dummy_renderer, $handled);
I made a few alterations to correctly handle start pages named as configured (start
by default) instead of hard-coded index
:
diff -ur autosearch.old/action.php autosearch/action.php --- autosearch.old/action.php 2014-03-31 16:54:00.662421400 +0100 +++ autosearch/action.php 2014-03-31 16:53:11.133588500 +0100 @@ -23,6 +23,7 @@ array()); } function handle_act(&$e, $param){ + global $conf; global $ID; if($e->data != 'show' || strpos($ID,'talk:')===0) return; @@ -36,6 +37,9 @@ foreach($index_pages as $index){ if($index == '@subpage_with_same_name') $index = noNS($ID); + if($index == '@start_page') + $index = $conf['start']; + if(is_file(wikiFN("$ID:$index"))){ header("Location: ".wl("$ID:$index", $perm < AUTH_CREATE ? "" : "auto_search_indexed=1")); die(); diff -ur autosearch.old/conf/default.php autosearch/conf/default.php --- autosearch.old/conf/default.php 2009-05-20 17:50:38.000000000 +0100 +++ autosearch/conf/default.php 2014-03-30 23:40:27.858605200 +0100 @@ -1,4 +1,4 @@ <?php -$conf['index_pages'] = 'index,home,@subpage_with_same_name'; +$conf['index_pages'] = '@start_page,@subpage_with_same_name'; $conf['pagelist'] = 1; $conf['search'] = 1; diff -ur autosearch.old/conf/metadata.php autosearch/conf/metadata.php --- autosearch.old/conf/metadata.php 2009-05-20 17:50:38.000000000 +0100 +++ autosearch/conf/metadata.php 2014-03-30 23:40:27.862105700 +0100 @@ -1,5 +1,5 @@ <?php $meta['index_pages'] = array('multicheckbox', - '_choices' => array('index','home','@subpage_with_same_name')); + '_choices' => array('@start_page','@subpage_with_same_name')); $meta['pagelist'] = array('onoff'); $meta['search'] = array('onoff');