tivicrdotcom Posted November 30, 2024 Share Posted November 30, 2024 Good day fellow geeks, so I migrated the site, all good, FO works but BO doesn't. I am getting the following error: CsrfTokenManager->getToken() in /home/fm1kjtxyz0tz/public_html/src/PrestaShopBundle/Service/Routing/Router.php (line 64) public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) { $username = $this->userProvider->getUsername(); // Do not generate token each time we want to generate a route for a user if (!isset($this->tokens[$username])) { $this->tokens[$username] = $this->tokenManager->getToken($username)->getValue(); } $url = parent::generate($name, $parameters, $referenceType); if (TokenInUrls::isDisabled()) { I manually cleared cache and added a new .htaccess file through ftp as I don;t have access. The only positive thing is that all 5 PS stores present the same problem, so, if I fix one, I fix them all. Thanks in advance! regards, AJ Link to comment Share on other sites More sharing options...
ComGrafPL Posted December 1, 2024 Share Posted December 1, 2024 Migration to 8, not the other hosting, correct? Have you changed PHP to 8+ version. You said you have manually cleared the cache and htaccess and "you dont have access to ftp". So you have or not? Similar issue: https://github.com/PrestaShop/PrestaShop/issues/13577 Link to comment Share on other sites More sharing options...
tivicrdotcom Posted December 1, 2024 Author Share Posted December 1, 2024 Hi @ComGrafPL, thanks for replying. So, after lots of research I found and solved the issue on the old server (VPN), it was as suggested, simply to change the destination folder for php from /opt/alt/php81/var/lib/php/session to /tmp. VPN has a clear cache button which I then clicked and worked like a charm. Now, the new server, which is shared, doesn't have the clear cache button (I have to ask GoDaddy about it), so, I pretty much did the same change, but on this server, that solution doesn't fix the problem as it did on the VPN. I guess I'll have to wait for support to help me with that as I am pretty sure it will solve the issue. I was getting the same exact error on the VPS, shared hosting is a bit different in terms of cache. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now