Error After Upgrade & Restore - Fatal Error: Class 'tygh' Not Found In /home/digitalsaveadmin/public_Html/app/addons/seo/controllers/frontend/init.pos

We have just attempted to run the Cs Cart upgrade, it broke the website (because of the 3rd party theme we have running) so we ran the restore backup and the website has broken, yay.



This is the error



Fatal error[color=#000000]: Class 'Tygh' not found in [/color]/home/digitalsaveadmin/public_html/app/addons/seo/controllers/frontend/init.post.php[color=#000000] on line [/color]19



No idea!

Please try to



#file

init.php



#replace

class_alias('\Tygh\Tygh', 'Tygh', true);



#with

class_alias('\Tygh\Tygh', 'Tygh');





I hope that helps,



[color=#282828][font=arial, verdana, tahoma, sans-serif]—[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]Valentin[/font][/color]

[color=#808080][font=arial, verdana, tahoma, sans-serif][size=2]part of hungryweb.net[/size][/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif] [/font][/color]

Hi Vali



Do you refer to init.php in the web root directory (public_html)?



If so, there doesnt appear to be this line in the file;



class_alias('\Tygh\Tygh', 'Tygh', true);



I appreciate your help!

custom szyle or theme is an upgrade issuse… you should report to the bugtracker…hope you will resolve thus issue.

regards

It has been reported, but need it sorting before they respond, my website is dead and I’m making no money :)

4.3.2

// Register autoloader
$this_dir = dirname(__FILE__);
$classLoader = require($this_dir . '/app/lib/vendor/autoload.php');
$classLoader->add('Tygh', $this_dir . '/app');
class_alias('\Tygh\Tygh', 'Tygh', true);


4.3.3

// Register autoloader
$this_dir = dirname(__FILE__);
$classLoader = require($this_dir . '/app/lib/vendor/autoload.php');
$classLoader->add('Tygh', $this_dir . '/app');
class_alias('\Tygh\Tygh', 'Tygh');

Hi The Tool, I'm not sure to what you are refering.



I have revereted back to 4.2.4 - as far as I belive, however, because the revert doesn't seem to have completed correctly, I may be stuck in limbo somewhere?

I'm referring to what Vali is referring to in the /init.php file. If you do not see this in the file then you have some serious issues.

But those are both for 4.3.2 and 4.3.3?



What should 4.2.4 be?

Oh, you didn't specify version so we were assuming the latest. May be a different issue?



4.2.4

// Register autoloader
$this_dir = dirname(__FILE__);
$classLoader = require($this_dir . '/app/lib/vendor/autoload.php');
$classLoader->add('Tygh', $this_dir . '/app');

When I try to clear the cache I also get this;



Your issue is obviously going to have to be investigated. The quickest way to get back up and running without waiting on someone is to restore a backup of your 4.2.4 store. Do you have a backup?

Yes & No - we like to do things in our own special way here at Digi Save haha… We get there in the end though



I have a backup from a few weeks ago, but we had made some major changes since then. We were talking about the upgrade before I just though - oh lets click it. Really wish we hadn’t now haha :D



We could really do with someone fixing it - devs! :)

As per the error, this is line 19 from init.post.php (Fatal error: Call to a member function assign() on a non-object in /home/digitalsaveadmin/public_html/app/addons/seo/controllers/frontend/init.post.php on line 19)



Tygh::$app['view']->assign('display_base_href', true);



Is that as should be? I've also changed to false with no change.

Looks like your store contains files both from 4.2.4 and 4.3.3 now. If I fix one issue, another one is displayed. Try to restore the website from server backup

deleted

Hi eCom



We replaced some of the files from the backup with what was still on the server and got a little further. We got rid of the afore mentioned Fatal Error, that created another, and so we replaced that file and that fixed the website.



So the website is back on BUT we can’t log into the back end; I get this error with my correct pass and user inputted



ErrorThe username or password you have entered is invalid. Please try again.



So, we’re getting there! :) Just need to be able to log in now. Any ideas without restoring the backup!? I’d really rather not.

We have reset the password. Please check PM for the new account details and try

Thanks Aleksy, we're in but order info is missing.