Page 1 of 1

[SOLVED] - Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 1:45 am
by atrane
Hello, today I was following advice on the forum to clear cache, so I clicked on the blue config button (top right) and a box is presented, and I turn both off, but then I got an Internal Error prompt, and now my Admin section is completely broke.

When I say completely broke, I mean all I get is 500 Error. Is there somewhere in the dB where I can correct this issue?

OC 3.0.3.1 Using Fastor Theme

Any And All help is appreciated.

UPDATE: Got the error log, and it states:

Code: Select all

2019-07-04 18:01:03 - PHP Warning:  include_once(): Failed opening '/home/www/domain.com/storage/vendor/scss.inc.php' for inclusion (include_path='.:/usr/local/php7.3/lib/php') in /home/www/domain.com/admin/controller/startup/sass.php on line 7

2019-07-04 18:02:18 - PHP Warning:  include_once(/home/www/domain.com/storage/vendor/scss.inc.php): failed to open stream: No such file or directory in /home/www/domain.com/admin/controller/startup/sass.php on line 7

2019-07-04 18:02:18 - PHP Warning:  include_once(): Failed opening '/home/www/domain.com/storage/vendor/scss.inc.php' for inclusion (include_path='.:/usr/local/php7.3/lib/php') in /home/www/domain.com/admin/controller/startup/sass.php on line 7
UPDATE: So I navigated to /admin/controller/startup/ and edited the file sass.php and commented out :

Code: Select all

// if (!is_file($file) || !$this->config->get('developer_sass')) {
		// 	include_once(DIR_STORAGE . 'vendor/scss.inc.php');			
		// 	$scss = new Scssc();
		// 	$scss->setImportPaths(DIR_APPLICATION . 'view/stylesheet/sass/');
		// 	$output = $scss->compile('@import "_bootstrap.scss"');
		// 	$handle = fopen($file, 'w');
		// 	flock($handle, LOCK_EX);
		// 	fwrite($handle, $output);
		// 	fflush($handle);
		// 	flock($handle, LOCK_UN);
		// 	fclose($handle);
		// }
		
Now it works, I can access my Admin Section again, but will I need this in the future?

Thanks

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 4:31 am
by straightlight
2019-07-04 18:02:18 - PHP Warning: include_once(/home/www/domain.com/storage/vendor/scss.inc.php): failed to open stream: No such file or directory in /home/www/dev.oldamishdewormer.com/admin/controller/startup/sass.php on line 7

Missing file on your server, not a bug.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 4:41 am
by atrane
Technically, it is a bug because it broke the UI/UX, even if there is a missing file, it should not cause a 500 Internal Server Error, this should be handled with a printed out error, not to mention the fact that I could not change it because I could no longer access the Admin section. I even created the file it was "missing" and still did not resolve the issue, only when I commented out the code was I able to access the Admin section again.

Thanks

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 4:54 am
by straightlight
Technically, it is a bug because it broke the UI/UX, even if there is a missing file, it should not cause a 500 Internal Server
Especially when other people do not report this behavior from OC. If it'd be a bug, there would be frequent reports about it which isn't the case. Otherwise, nobody pretty much would be able to use the SASS cache and the developers cache.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 5:02 am
by atrane
I appreciate your response, however, in my years of QA experience, if a single user reports an issue as this, it is deemed a bug and fixed to prevent any future reports, as the saying goes, if 1 user finds it, eventually another will also, and so on, but it is what it is. I resolved the issue and thus, I will close this from the forum.

Thanks

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 5:09 am
by straightlight
atrane wrote:
Fri Jul 05, 2019 5:02 am
I appreciate your response, however, in my years of QA experience, if a single user reports an issue as this, it is deemed a bug and fixed to prevent any future reports, as the saying goes, if 1 user finds it, eventually another will also, and so on, but it is what it is. I resolved the issue and thus, I will close this from the forum.

Thanks
That analogy would be incorrect. Major incidents are based on multiple reports where users needs to create incident requests. If 1 user posts an issue among others where their stores are working as expected, it's not a bug; it's a server configuration issue from 1 user.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 5:17 am
by atrane
Okay, I appreciate your responses, however, I do not appreciate your condescending and plain out erroneous reply(s). Its apparent that we will not agree with the "issue" that was, and im not interested in an arm wrestling match with you, so I will leave this at that, and it is what it is. No further response is needed. You have yourself a very good day!

Thank you.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Jul 05, 2019 7:02 am
by straightlight
Have it your way. What you're reporting is not a bug as the rest goes to you to configure your storage folder properly.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Feb 07, 2020 8:08 pm
by dazmaster9
I have the exact same issue. I download OC this morning, so latest version, I installed on localhost, only the bare installation, no custom theme, I then signed into admin and clicked the gears icon to turn cache off, i hit the button a couple of times, got a json error and now my admin pannel is not accessible just throwing errors:

Code: Select all

Trying to access array offset on value of type null in C:\xampp\storage\vendor\scss.inc.php on line 1753
(hundreds of times) :-(

so there is a bug, I have seen it posted on other forums as well, so mine is a fresh install, no custom theme, no other extensions, zero mods, i had not touched settings or files, the first thing I wanted to do was disable cache.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Feb 07, 2020 9:45 pm
by straightlight
dazmaster9 wrote:
Fri Feb 07, 2020 8:08 pm
I have the exact same issue. I download OC this morning, so latest version, I installed on localhost, only the bare installation, no custom theme, I then signed into admin and clicked the gears icon to turn cache off, i hit the button a couple of times, got a json error and now my admin pannel is not accessible just throwing errors:

Code: Select all

Trying to access array offset on value of type null in C:\xampp\storage\vendor\scss.inc.php on line 1753
(hundreds of times) :-(

so there is a bug, I have seen it posted on other forums as well, so mine is a fresh install, no custom theme, no other extensions, zero mods, i had not touched settings or files, the first thing I wanted to do was disable cache.
OC version?

Re: Turning Cache Off Broke Admin Section

Posted: Sat Feb 08, 2020 4:03 am
by sw!tch
dazmaster9 wrote:
Fri Feb 07, 2020 8:08 pm

Code: Select all

Trying to access array offset on value of type null in C:\xampp\storage\vendor\scss.inc.php on line 1753
Also list your PHP version. I think this is an issue in PHP 7.4 , maybe roll back to 7.3 and see if you still get the error.

Re: Turning Cache Off Broke Admin Section

Posted: Fri Feb 14, 2020 1:29 am
by dccTrader
I ran into the same problem today.
You might try and change the code in /storage/vendor/scss.inc.php , line 1753 to:

Code: Select all

if (is_array($key)) $key = $key[1];
That worked for me.
Hope this helps.

Re: Turning Cache Off Broke Admin Section

Posted: Sat Apr 11, 2020 3:13 am
by liyeah
dccTrader wrote:
Fri Feb 14, 2020 1:29 am
I ran into the same problem today.
You might try and change the code in /storage/vendor/scss.inc.php , line 1753 to:

Code: Select all

if (is_array($key)) $key = $key[1];
That worked for me.
Hope this helps.
This worked for me. Thanks!