Skip to content

Commit

Permalink
Item11262: Item13203: tools/configure does not save wizards
Browse files Browse the repository at this point in the history
Pass the changes made by wizards into the "set" hash if -save option is
included.  Allow -save to be active when a -wizard is requested.

Document the cli wizard operation in InstallationGuidePart2 and clarify
the Search configuration.
  • Loading branch information
gac410 committed Jan 11, 2015
1 parent 26c27cd commit 1e73043
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
11 changes: 9 additions & 2 deletions core/data/System/InstallationGuidePart2.txt
Expand Up @@ -20,10 +20,17 @@ Note the =configure= page mentioned in this section is accessed by visiting =[[%

On the =Store= pane in =configure= you will find the setting ={Store}{SearchAlgorithm}=.

By default bootstrap sets it to =Foswiki::Store::SearchAlgorithms::PurePerl=. This is the most compatible option. If you install Foswiki in Linux or any other Unix type operating system, and are not using =mod_perl=, you can set this to =Foswiki::Store::SearchAlgorithms::Forking=.
By default bootstrap attempts to pick the best implementation for your system. You can optimize search by choosing algorithms as follows:
* Windows servers and mod_perl installations should choose =Foswiki::Store::SearchAlgorithms::PurePerl=
* Linux or any other Unix type operating system not using =mod_perl=, can set this to =Foswiki::Store::SearchAlgorithms::Forking=.
* If for some reason grep / egrep is not found on default path, bootstrap will choose PurePerl. You can still use Forking search if desired by manually setting the paths to =grep= and =egrep= in the configuration.

If you install Foswiki on a Windows server, using an external grep program can create problems because of limitations in the length of command lines. You may be able to run with Forking in Windows if your directory path to Foswiki is kept short (short directory names and few levels), however the recommended (safe) setting for Windows is =Foswiki::Store::SearchAlgorithms::PurePerl=.

There are several other options available for search tools via the [[http://foswiki.org/Extensions][Extensions web]], including:
* Foswiki:Extensions.NativeSearchContrib - The Foswiki PurePerl search implemented in C. (compiler required)
* Foswiki:Extensions.SolrPlugin - An indexed search based on the [[http://lucene.apache.org][Lucene]] Java search library. It runs on a separate Tomcat or jetty serverlet container.

---+++ Site configuration and maintenance

#SetPreferences
Expand Down Expand Up @@ -155,7 +162,7 @@ tools/configure -save -set {WebMasterEmail}='user@email.com'
tools/configure -save -set {SMTP}{MAILHOST}='smtpserver.email.com'
tools/configure -save -set {SMTP}{Username}='userid'
tools/configure -save -set {SMTP}{Password}='password'
tools/configure -wizard AutoConfigureEmail -method autoconfigure
tools/configure -save -wizard AutoConfigureEmail -method autoconfigure
</verbatim>

---+++ Customizing your site
Expand Down
27 changes: 19 additions & 8 deletions core/tools/configure
Expand Up @@ -130,12 +130,6 @@ if ( $action =~ /^get/ && scalar( keys %{ $params->{set} } ) ) {
exit 1;
}

if ( $params->{save} ) {
delete $params->{save};
$params->{wizard} = 'Save';
$params->{method} = 'save';
}

if ( $params->{set}{'{Password}'} ) {
$params->{set}{'{Password}'} =
_setPassword( 'admin', $params->{set}{'{Password}'} );
Expand Down Expand Up @@ -333,13 +327,30 @@ _set_logger($params);

if ($action) {
$action = "Foswiki::Configure::Query::$action";
no strict 'refs';

#print STDERR Data::Dumper->Dump([$params], [$action]);
no strict 'refs';
my $response = &$action( $params, $reporter );
use strict 'refs';

_reply($response);

# Copy the changes into the "set" hash to be applied by save.
if ( keys $response->{changes} ) {
if ( $actions{save} ) {
$params->{set} = $response->{changes};
}
else {
print STDERR
"Changes made by $params->{wizard} wizard, but -save option not requested. Nothing saved.\n";
print STDERR
"Rerun the $params->{wizard} with the -save option to update the configuration.\n";

#print STDERR Data::Dumper::Dumper( \$response->{changes} );
}
}
else {
print STDERR "No configuration changes made by $params->{wizard}\n";
}
}

if ( $actions{save} ) {
Expand Down

0 comments on commit 1e73043

Please sign in to comment.