Page 1 of 1

Upgrade errors for latest version

Posted: Tue Aug 25, 2015 5:50 pm
by PlatinumPlace
Hi All,

I read somewhere that upgrading to the new 2.0 of Opencart was pretty easy......so took the plunge.
Followed the instructions and got a page of errors, when trying to log into Admin and the site, including :

'Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in…'

I tried to do the config changes, as suggested, and now I just get blank pages for both the website and admin.

Am am ok with technical stuff, but this has given me a headache!

Any suggestions, now that I can't sell anything :-(

Regards,

Andy

Re: Upgrade errors for latest version

Posted: Tue Aug 25, 2015 7:34 pm
by deepvision
Did you add DIR_MODIFICATION to the config?
Blank page means there is a fatal error somewhere. Either database has not been upgraded properly or OC files.
The error must be logged in the /system/logs/error.txt. Or in the server error log available from Cpanel/Plesk

Re: Upgrade errors for latest version

Posted: Tue Aug 25, 2015 7:40 pm
by PlatinumPlace
Hi there, and thanks for your reply.

A fatal error does not sound good :-(

I think I done the config edit correctly, but now not too sure.

What lines would it be placed into?

Regards,

Andy

Re: Upgrade errors for latest version

Posted: Tue Aug 25, 2015 8:13 pm
by deepvision
if it was not placed correctly you would have seen an error notice.
Now that there is a blank page you should contact error logs as I suggested to find the problem cause so that it can be fixed.

Re: Upgrade errors for latest version

Posted: Tue Aug 25, 2015 9:50 pm
by straightlight
Hi PlatinumPlace,

I would suggest two following approach in this case by making a backup of both config files (catalog and admin):

1 - To replace the following constants with these:

Code: Select all

define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/');
define('DIR_SYSTEM', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/system/');
define('DIR_OPENCART', str_replace('\\', '/', realpath(DIR_APPLICATION . '../')) . '/');
define('DIR_DATABASE', DIR_SYSTEM . 'database/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_MODIFICATION', DIR_SYSTEM . 'modification/');
2 - To simply view each outputted lines of step 1 into a log file stored in your system/logs/server_path.log into a separated PHP file stored on the root folder of your store:

server_path.php (needs to be created):

Code: Select all

<?php
define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/');
define('DIR_SYSTEM', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/system/');
define('DIR_OPENCART', str_replace('\\', '/', realpath(DIR_APPLICATION . '../')) . '/');
define('DIR_DATABASE', DIR_SYSTEM . 'database/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_MODIFICATION', DIR_SYSTEM . 'modification/');

require_once(DIR_SYSTEM . 'log.php');

$log = new Log('server_path.log');

$log->write('DIR_APPLICATION: ' . DIR_APPLICATION);
$log->write('DIR_SYSTEM: ' . DIR_SYSTEM);
$log->write('DIR_CATALOG: ' . DIR_OPENCART);
$log->write('DIR_DATABASE: ' . DIR_DATABASE);
$log->write('DIR_LANGUAGE: ' . DIR_LANGUAGE);
$log->write('DIR_TEMPLATE: ' . DIR_TEMPLATE);
$log->write('DIR_CONFIG: ' . DIR_CONFIG);
$log->write('DIR_MODIFICATION: ' . DIR_MODIFICATION);
?>
Once the file executed, visit the system/logs/server_path.log file I just created and copy each of the right definitions into each right definitions of your config.php file accordingly. Once applied, simply delete server_path.php and server_path.log file and you're done.

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 3:25 am
by PlatinumPlace
Thanks for your replies.

Do you know if there is anyone out there that would be able to do this for me, as a service?

Regards,

Andy

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 3:58 am
by PlatinumPlace
I copied and pasted the config file, so that they both matched, and I could then get into the admin side of things. There were a whole host of errors at the top of the screen, and the dashboard was below. I changed settings in the 'settings' area, and now can see the admin part with no errors (yet).

I still have a blank page at www.platinum-place.com

Now looking for the fix to this :-)

Regards,

Andy

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:13 am
by straightlight
admin/config.php file and config.php file is pretty similar but are not identical. For instance, the DIR_APPLICATION must be changed to your catalog folder at the end rather than the admin folder.

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:24 am
by PlatinumPlace
That got me a little further :-) thank you.

Now have:

Notice: Error: Could not load template /platinum-place.com/admin/view/template/default/template/common/column_left.tpl! in /platinum-place.com/system/engine/loader.php on line 45

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:33 am
by PlatinumPlace
Now changed code in config

define('DIR_TEMPLATE', '/home/user/folder/www.site.com/catalog/view/theme/');

Now I can see a basic version of the site...

www.platinum-place.com

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:36 am
by straightlight
If you expect to see a custom theme rather than the default template, it would need to be adjusted under your admin settings page by switching from default to your custom theme folder.

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:41 am
by PlatinumPlace
I have tried changing the theme to 'Carbon' but it gives more errors than selecting default.

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:43 am
by straightlight
If error messages are provided specifically based on the custom theme but nothing unusual to report regarding the default template, then it would be best to contact the author of the contribution that developed the custom theme to resolve this issue at this point.

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 4:44 am
by PlatinumPlace
Many thanks for your help with this :-)

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 6:01 am
by PlatinumPlace
I now have full access to the Admin side, with no errors :-)

Now the front end is coming up, but without my old welcome message, ad with lots of items with the word 'text_' before them.
If I go to edit the welcome message, in admin, I get an error.

www.platinum-place.com

I uploaded a template that is compatible with Version 2.0.3.1 but it has the same text problems.

Any ideas on this one?

Re: Upgrade errors for latest version

Posted: Wed Aug 26, 2015 7:21 am
by straightlight
This issue may be caused by missing or corrupted files. I would suggest restoring your previous backup to fix these problems. Otherwise, you may end up working file-to-file until this matter gets resolved if you don't have any backup unless your host can pull up a previous backup that was done systematically through your domain that can be restored.