Page 1 of 1

PayPalGateway error in admin message

Posted: Sun May 03, 2015 7:06 pm
by 10010110
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:

Code: Select all

<!-- OneEleven::ShowErrors() called -->
The function for this error is in OneElevenTheme.php on lines 39–57:

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 -->';
}
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?

Re: PayPalGateway error in admin message

Posted: Mon May 04, 2015 5:45 pm
by Dr.CSS
It's not really an error as much as a warning or a notice so you will remember that it is in 'test' mode in case you go leave and don't reset it, is no big thing as I have a site that has had that for quite a few months now with no problem..

Re: PayPalGateway error in admin message

Posted: Tue May 05, 2015 8:13 pm
by 10010110
I think you misunderstood me, Dr. CSS. It’s not the message that worrys me, it is that there is no message and instead, an error (in a comment) comes up. That should not happen.