- fix: Shopping Cart Not Working
- fix: Editing Products Template wipes out SKU - fix: Email to RFE List Going to Spam - fix: 7.0.0-7.0.1 upgrade -- op called w/o passing session - fix: spectre.pl daemon error - Changed the Spectre tests to be a seperate option on the spectre.pl command line, which fixed a problem with the WRE monitor, and also enabled us to add more complete connectivity testing.
This commit is contained in:
parent
f83c0fa957
commit
f420103b2e
7 changed files with 40 additions and 23 deletions
|
|
@ -26,6 +26,14 @@
|
|||
- Made some improvements to the mail subsystems.
|
||||
- fix: Revised WebGUI::HTML::filter "all" so that text does not run together when
|
||||
tags are removed. Added additional tests to HTML.t. (Eric Kennedy)
|
||||
- fix: Shopping Cart Not Working
|
||||
- fix: Editing Products Template wipes out SKU
|
||||
- fix: Email to RFE List Going to Spam
|
||||
- fix: 7.0.0-7.0.1 upgrade -- op called w/o passing session
|
||||
- fix: spectre.pl daemon error
|
||||
- Changed the Spectre tests to be a seperate option on the spectre.pl command
|
||||
line, which fixed a problem with the WRE monitor, and also enabled us to
|
||||
add more complete connectivity testing.
|
||||
- fix: Templates XHTML compliance (Wouter van Oijen / ProcoliX)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,6 @@ sub new {
|
|||
my $logger = Log::Log4perl->get_logger($config->getFilename);
|
||||
my $self = {_debug=>$debug, _config=>$config, _logger=>$logger};
|
||||
bless $self, $class;
|
||||
$self->runTests();
|
||||
$self->debug("Trying to bind to ".$config->get("ip").":".$config->get("port"));
|
||||
create_ikc_server(
|
||||
ip => $config->get("ip"),
|
||||
|
|
@ -179,38 +178,42 @@ sub ping {
|
|||
|
||||
=head2 runTests ( )
|
||||
|
||||
Executes a test to see if Spectre can establish a connection to WebGUI and get back a valid response.
|
||||
Executes a test to see if Spectre can establish a connection to WebGUI and get back a valid response. This is a class method.
|
||||
|
||||
=head3 config
|
||||
|
||||
A WebGUI::Config object that represents the spectre.conf file.
|
||||
|
||||
=cut
|
||||
|
||||
sub runTests {
|
||||
my $self = shift;
|
||||
my $class = shift;
|
||||
my $config = shift;
|
||||
$self->debug("Running connectivity tests.");
|
||||
my $configs = WebGUI::Config->readAllConfigs($self->config->getWebguiRoot);
|
||||
foreach my $config (keys %{$configs}) {
|
||||
print "Running connectivity tests.\n";
|
||||
my $configs = WebGUI::Config->readAllConfigs($config->getWebguiRoot);
|
||||
foreach my $key (keys %{$configs}) {
|
||||
next if $config =~ m/^demo/;
|
||||
$self->debug("Testing $config");
|
||||
print "Testing $key\n";
|
||||
my $userAgent = new LWP::UserAgent;
|
||||
$userAgent->agent("Spectre");
|
||||
$userAgent->timeout(30);
|
||||
my $url = "http://".$configs->{$config}->get("sitename")->[0].":".$self->config->get("webguiPort").$configs->{$config}->get("gateway")."?op=spectreTest";
|
||||
my $url = "http://".$configs->{$key}->get("sitename")->[0].":".$config->get("webguiPort").$configs->{$key}->get("gateway")."?op=spectreTest";
|
||||
my $request = new HTTP::Request (GET => $url);
|
||||
my $response = $userAgent->request($request);
|
||||
if ($response->is_error) {
|
||||
$self->error("Couldn't connect to WebGUI site $config");
|
||||
print "ERROR: Couldn't connect to WebGUI site $key\n";
|
||||
} else {
|
||||
my $response = $response->content;
|
||||
if ($response eq "subnet") {
|
||||
$self->error("Spectre cannot communicate with WebGUI for $config, perhaps you need to adjust the spectreSubnets setting in this config file.");
|
||||
print "ERROR: Spectre cannot communicate with WebGUI for $key, perhaps you need to adjust the spectreSubnets setting in this config file.\n";
|
||||
} elsif ($response eq "spectre") {
|
||||
$self->error("WebGUI connot communicate with Spectre for $config, perhaps you need to adjust the spectreIp or spectrePort setting the this config file.");
|
||||
print "ERROR: WebGUI connot communicate with Spectre for $key, perhaps you need to adjust the spectreIp or spectrePort setting the this config file.";
|
||||
} elsif ($response ne "success") {
|
||||
$self->error("Spectre received an invalid response from WebGUI while testing $config");
|
||||
print "ERROR: Spectre received an invalid response from WebGUI while testing $key\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
$self->debug("Tests completed.");
|
||||
print "Tests completed.\n";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -219,8 +219,7 @@ The instantiated plugin of this item. See WebGUI::Commerce::Item for a detailed
|
|||
sub getItems {
|
||||
my ($self, $periodResolve, %cartContent, $item, $properties, @recurring, @normal);
|
||||
$self = shift;
|
||||
|
||||
$periodResolve = WebGUI::Commerce::Payment::recurringPeriodValues($self->session);
|
||||
$periodResolve = WebGUI::Commerce::Payment->recurringPeriodValues($self->session);
|
||||
%cartContent = %{$self->{_items}};
|
||||
foreach (values(%cartContent)) {
|
||||
$item = WebGUI::Commerce::Item->new($self->session,$_->{itemId}, $_->{itemType});
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,7 @@ sub www_viewCart {
|
|||
$var{'checkoutForm.header'} = WebGUI::Form::formHeader($session,).
|
||||
WebGUI::Form::hidden($session,{name => 'op', value => 'checkout'});
|
||||
$var{'checkoutForm.button'} = WebGUI::Form::submit($session,{value => $i18n->get('checkout')});
|
||||
$var{'checkoutForm.footer'} = WebGUI::Form::formFooter;
|
||||
$var{'checkoutForm.footer'} = WebGUI::Form::formFooter($session);
|
||||
|
||||
$var{normalItemsLoop} = $normal;
|
||||
$var{normalItems} = scalar(@$normal);
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ sub www_editProduct {
|
|||
-name => 'sku',
|
||||
-label => $i18n->get('sku'),
|
||||
-hoverHelp => $i18n->get('sku description'),
|
||||
-value => $session->form->process("sku") || $product->{SKU},
|
||||
-value => $session->form->process("sku") || $product->{sku},
|
||||
-maxlength => 64,
|
||||
);
|
||||
$f->template(
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ sub www_spectreTest {
|
|||
name=>rand(100000),
|
||||
timeout=>10
|
||||
);
|
||||
$remote->disconnect;
|
||||
# Can't perform this test until I get smarter. =)
|
||||
#return "spectre" unless $remote;
|
||||
#my $result = $remote->post_respond('admin/ping');
|
||||
#return "spectre" unless defined $result;
|
||||
return "spectre" unless defined $remote;
|
||||
my $result = $remote->post_respond('admin/ping');
|
||||
$remote->disconnect;
|
||||
return "spectre" unless defined $result;
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ my $ping;
|
|||
my $daemon;
|
||||
my $run;
|
||||
my $debug;
|
||||
my $test;
|
||||
|
||||
GetOptions(
|
||||
'help'=>\$help,
|
||||
|
|
@ -30,10 +31,11 @@ GetOptions(
|
|||
'shutdown'=>\$shutdown,
|
||||
'daemon'=>\$daemon,
|
||||
'debug' =>\$debug,
|
||||
'run' => \$run
|
||||
'run' => \$run,
|
||||
'test' => \$test
|
||||
);
|
||||
|
||||
if ($help || !($ping||$shutdown||$daemon||$run)) {
|
||||
if ($help || !($ping||$shutdown||$daemon||$run||$test)) {
|
||||
print <<STOP;
|
||||
|
||||
S.P.E.C.T.R.E. is the Supervisor of Perplexing Event-handling Contraptions for
|
||||
|
|
@ -57,6 +59,9 @@ if ($help || !($ping||$shutdown||$daemon||$run)) {
|
|||
|
||||
--shutdown Stops the running Spectre server.
|
||||
|
||||
--test Tests the connection between Spectre and WebGUI. Both Spectre
|
||||
and WebGUI must be running to use this function.
|
||||
|
||||
STOP
|
||||
exit;
|
||||
}
|
||||
|
|
@ -90,6 +95,8 @@ if ($shutdown) {
|
|||
my $res = ping();
|
||||
print "Spectre is Alive!\n" unless $res;
|
||||
print "Spectre is not responding.\n".$res if $res;
|
||||
} elsif ($test) {
|
||||
Spectre::Admin->runTests($config);
|
||||
} elsif ($run) {
|
||||
Spectre::Admin->new($config, $debug);
|
||||
} elsif ($daemon) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue