PayPalGateway error in admin message
Posted: Sun May 03, 2015 7:06 pm
I filed a bug report about this but calguy1000 wouldn’t accept this, stating it was an error in the admin theme rather than the module. However, this is the only module where I’ve experienced this so far, so I’m coming here because calguy1000 obviously doesn’t bother to read follow-up comments in the bug tracker for closed bugs.
So, without further ado, here we go: When the PaypalGateway module is in test/sandbox mode there is a system notification stating that it is in test mode. However, this only works the first time the admin screen is loaded; once I work in the admin area and another admin page is loaded that description isn’t there anymore, just the notification title (the module name) is shown. Looking at the HTML source code I see that the message is replaced by this comment:
The function for this error is in OneElevenTheme.php on lines 39–57:
Why is this happening? It appears to have something to do with a session cache/cookie or whatever because if I change the admin theme to NCleanGrey, for example, which doesn’t have this function, the error of the previous theme persists, and it only goes away after a while.
In any case, this has only been happening with the PayPalGateway module so far. Any ideas?
So, without further ado, here we go: When the PaypalGateway module is in test/sandbox mode there is a system notification stating that it is in test mode. However, this only works the first time the admin screen is loaded; once I work in the admin area and another admin page is loaded that description isn’t there anymore, just the notification title (the module name) is shown. Looking at the HTML source code I see that the message is replaced by this comment:
Code: Select all
<!-- OneEleven::ShowErrors() called -->Code: Select all
public function ShowErrors($errors, $get_var = '') {
// cache errors for use in the template.
if ($get_var != '' && isset($_GET[$get_var]) && !empty($_GET[$get_var])) {
if (is_array($_GET[$get_var])) {
foreach ($_GET[$get_var] as $one) {
$this->_errors[] = lang(cleanValue($one));
}
} else {
$this->_errors[] = lang(cleanValue($_GET[$get_var]));
}
} else if (is_array($errors)) {
foreach ($errors as $one) {
$this->_errors[] = $one;
}
} else if (is_string($errors)) {
$this->_errors[] = $errors;
}
return '<!-- OneEleven::ShowErrors() called -->';
}
In any case, this has only been happening with the PayPalGateway module so far. Any ideas?