Page 1 of 2

Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Wed Oct 03, 2018 12:20 am
by godly75
Finally got to update from OC 1.2 to 3.0.2
Backend works perfect, but front still gives these errors.
You guys have any ideas?

Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.catalog.language.1538501250): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 49Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 51Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 55Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 57Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 59Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.currency.1538501250): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 49Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 51Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 55Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 57Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 59Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.catalog.language.1538501251): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 49Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 51Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 55Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 57Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 59Warning: fopen(/home/encounters/domains/encounters.be/shop_update/system/cache/cache.currency.1538501251): failed to open stream: No such file or directory in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 49Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 51Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 55Warning: flock() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 57Warning: fclose() expects parameter 1 to be resource, boolean given in /home/encounters/domains/encounters.be/public_html/shop_update/system/library/cache/file.php on line 59

Re: Finally update, backend is OK, front is still errors

Posted: Wed Oct 03, 2018 1:16 am
by godly75
Almost a solution here, but doesn't work for me
viewtopic.php?f=201&t=186797&p=736013

ps: i'm on latest OC 3.0.2 and php 7.0

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Wed Oct 03, 2018 3:11 am
by opencart.my
Congratulations on upgrading @godly75!

The error seems to be OpenCart expecting the folder /home/encounters/domains/encounters.be/shop_update/system/cache/ directory to exist on your server.

Verify if the directory exists on your store server or not. If not, you may need to manually create it and make sure your webserver(Apache) has access permission to it.

I'm not sure if you have performed an upgrade or a fresh install. However, in OpenCart v3.0.x right after installation, logging in to your store admin backend on the first time will prompt you to decide on the location of the 'storage' directory, which will be used by OpenCart for writable files such as logs, session, modification, upload, download, and cache. The path in your error seems to me that you did not define the storage directory correctly, or you have chosen '/system/' to be your storage directory, which is not the best location choice.

In that case, you may need to modify the storage path manually:

Please open and view the following file in your store:
/home/encounters/domains/encounters.be/shop_update/config.php around line 12:

Code: Select all

define('DIR_STORAGE', '/file/path/to/your/storage/directory/');

Check if the folder defined in the file path for DIR_STORAGE valid or not. If not, you may want to manually define it, e.g. /home/encounters/domains/encounters.be/shop_update/system/storage/

Then, you will need to create the 'cache' directory in it, together with the other directories that also use DIR_STORAGE found in the /config.php file.

Hope it helps.

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Wed Oct 03, 2018 3:36 am
by godly75
Hm, the site gives a JSON error also when clicking the favorites icon...
check http://encounters.be/shop_update/
Seems to be related to file.php error
https://i.imgur.com/L9qef2c.jpg

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Wed Oct 03, 2018 11:29 pm
by opencart.my
@godly75,

The JSON error is caused by the same problem I described in my previous reply.

You need to fix your 'DIR_STORAGE' path in your /config.php file.

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Thu Oct 04, 2018 5:15 pm
by godly75
Thx, it's automaticly generated by opencart, and accepted, so it should be ok right?
I tried moving it to another location and changing both configs but the problem persists.
I hope you guys can help me out, as OC 2.0 really has some annoying bugs and I need to update...

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Fri Oct 05, 2018 7:06 am
by ADD Creative
What are your DIR_STORAGE and DIR_CACHE set to in config.php and what are the permissions on the directories they point to?

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 12:26 am
by godly75
Thx,

I don't see anything wrong there??? And the folders are located as shown here?
And dir are 755

Code: Select all

// DIR
*
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');



// DB


// Dir cache error
***

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 12:58 am
by ADD Creative
DIR_APPLICATION, DIR_SYSTEM,DIR_IMAGE look OK. DIR_STORAGE should probably be moved to somewhere else, but should not stop it working. You have DIR_MODIFICATION and DIR_LOGS twice.

The rest should be as follows.

Code: Select all

define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
Then make sure you have a cache directory under your storage directory.

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 1:30 am
by godly75
Maaaaaaaan !!!! O0
I can't express how happy I am ! !!!!!!!!!!! :) :-* :-* :-* :-*

Works perfect to get that error fixed !!! jeeeeeeeeej

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 1:34 am
by godly75
That probably was ported from the old version ! :)

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 5:07 am
by ADD Creative
Good to here. The recommendation is for the storage directory to be moved to where it can't be publicly accessible. If that's not the case you may want to move it again.

It might be good idea to close your GitHub issue.

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 5:19 am
by godly75
Thx, I'll do that.
Other problem, the text editor isn't showing in the products page (it is on modules).
Any idea?

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 8:18 am
by godly75
I now installed Hit editor, but this requires a license. How can I activate the internal html text editor?

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 8:47 am
by ADD Creative
Do you get any errors in the error logs? Have you also checked your web browser's developments console (usually F12)?

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sat Oct 06, 2018 9:28 am
by godly75
Indeed error !
Any idea?



summernote.js:4053 Uncaught TypeError: Cannot read property 'style' of undefined
at summernote.js:4053
at Array.reduce (<anonymous>)
at Object.style (summernote.js:4052)
at Renderer.createLayoutByFrame (summernote.js:4683)
at Renderer.createLayout (summernote.js:4741)
at HTMLTextAreaElement.<anonymous> (summernote.js:4818)
at Function.each (jquery-2.1.1.min.js:2)
at n.fn.init.each (jquery-2.1.1.min.js:2)
at n.fn.init.summernote (summernote.js:4814)
at HTMLTextAreaElement.<anonymous> (opencart.js:10)

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sun Oct 07, 2018 12:02 am
by godly75
A jquery error?

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sun Oct 07, 2018 5:00 am
by ADD Creative
Is it only the product page that generates the error and fails to load the Summernote editor? Have you check all the other pages. If so check the template file against the orignal. https://github.com/opencart/opencart/bl ... _form.twig

Also fo you have any extensions or modifications that make changes to that page?

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Sun Oct 07, 2018 10:23 am
by straightlight
In addition, if you use a custom theme, switch back to the default theme and see if the same issue can be reproduced.

Re: Warning: fopen(/system/cache/cache.language (update, backend is OK, front is still errors)

Posted: Mon Oct 08, 2018 11:13 am
by godly75
thx, it's a default admin theme, i just upgraded to v3 from v2.
I try installing from a clean version, but that gives problems with the customers sql tables...