diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c2799e19f..0c4c90a25 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -11,6 +11,7 @@ - fixed #9749: Account Manager: AIM link - fixed #9751: Account Manager: problem sorting in Contributions - fixed #9750: Account Manager: Inbox Messages per Page [TEMPLATE] + - fixed: If the Get Credentials template is deleted for the ITransact PayDriver, it now gives you an error message instead of throwing an error. - fixed: Collaboration groupToEditPost should not be blank - fixed: WebGUI::User->isInGroup had bad default groupId diff --git a/lib/WebGUI/Shop/PayDriver/ITransact.pm b/lib/WebGUI/Shop/PayDriver/ITransact.pm index 881e1bf0a..593dd9c5e 100644 --- a/lib/WebGUI/Shop/PayDriver/ITransact.pm +++ b/lib/WebGUI/Shop/PayDriver/ITransact.pm @@ -668,7 +668,6 @@ sub www_getCredentials { # Process form errors $var->{errors} = []; - #### TODO: i18n if ($errors) { $var->{error_message} = $i18n->get('error occurred message'); foreach my $error (@{ $errors} ) { @@ -743,8 +742,16 @@ sub www_getCredentials { }); my $template = WebGUI::Asset::Template->new($session, $self->get("credentialsTemplateId")); - $template->prepare; - return $session->style->userStyle($template->process($var)); + my $output; + if (defined $template) { + $template->prepare; + $output = $template->process($var); + } + else { + $output = $i18n->get('template gone'); + } + + return $session->style->userStyle($output); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/i18n/English/PayDriver_ITransact.pm b/lib/WebGUI/i18n/English/PayDriver_ITransact.pm index 4148fae41..7f29c724c 100644 --- a/lib/WebGUI/i18n/English/PayDriver_ITransact.pm +++ b/lib/WebGUI/i18n/English/PayDriver_ITransact.pm @@ -292,6 +292,11 @@ our $I18N = { lastUpdated => 0, context => q|The default description of purchase of users.| }, + 'template gone' => { + message => q|The template for entering in credentials has been deleted. Please notify the site administrator.|, + lastUpdated => 0, + context => q|Error message when the getCredentials template cannot be accessed.| + }, 'show terminal' => { message => q|Click here to use your virtual terminal.|, lastUpdated => 0,