Canozkan Posted June 14, 2020 Share Posted June 14, 2020 { if (null === $this->container) { $this->container = SymfonyContainer::getInstance(); } return $this->container->get($serviceName); } } ERROR IMAGE How i can fix this error ? Link to comment Share on other sites More sharing options...
Matt75 Posted June 14, 2020 Share Posted June 14, 2020 Hi its a cache related issue. A new version has been released some days ago : https://github.com/PrestaShopCorp/ps_mbo/releases/latest Please follow instructions given. 3 Link to comment Share on other sites More sharing options...
dannielhendrix Posted June 17, 2020 Share Posted June 17, 2020 That doesn't solve anything! Link to comment Share on other sites More sharing options...
Matt75 Posted June 17, 2020 Share Posted June 17, 2020 10 minutes ago, dannielhendrix said: That doesn't solve anything! if your problem is not solved after that, follow latest instruction How to fix this issue on PrestaShop If you are in production it can be useful to enable maintenance mode to avoid concomitant access to cache when cleaning or warmup. You can do that with this SQL Query on MySQL (use phpmyadmin for example) UPDATE ps_configuration SET value = 0 WHERE name = "PS_SHOP_ENABLE" (If you use a custom table prefix, change table name accordingly) You should unzip new module version of ps_mbo then upload it with ftp software in modules folder of your PrestaShop Instance. After that go to var/cache folder then rename dev to dev.old and prod to prod.old ; finally delete dev.old and prod.old If issue still occur please rename ps_mbo folder to ps_mbo.bak in your modules folder. Link to comment Share on other sites More sharing options...
dannielhendrix Posted June 17, 2020 Share Posted June 17, 2020 ok, at this solution I was referring that didn't work! Finally I just did the last part(rename ps_mbo folder to ps_mbo.bak in your modules folder.) and that's it Link to comment Share on other sites More sharing options...
Matt75 Posted June 17, 2020 Share Posted June 17, 2020 1 minute ago, dannielhendrix said: ok, at this solution I was referring that didn't work! Finally I just did the last part(rename ps_mbo folder to ps_mbo.bak in your modules folder.) and that's it You have a cache issue, did you use OPCache or other cache system ? What is your hosting provider ? Link to comment Share on other sites More sharing options...
Canozkan Posted June 17, 2020 Author Share Posted June 17, 2020 I solved the problem like this. I did not change the 127.0.0.1 (Default value) written to the server part during the installation phase. When I couldn't solve the problem, I deleted all the files and reinstalled them and wrote 127.0.0.1 again in the server section. In the third installation, I wrote "LOCALHOST" on the server partition and when I checked it the problem was fixed. Of course, I do not know if this is the same problem with you, only my solution has been realized in this way. Link to comment Share on other sites More sharing options...
Matt75 Posted June 17, 2020 Share Posted June 17, 2020 So you are in a local environment ? What is your PHP version, are you sure about your server configuration ? https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/ Link to comment Share on other sites More sharing options...
Canozkan Posted June 17, 2020 Author Share Posted June 17, 2020 Just now, Matt75 said: So you are in a local environment ? What is your PHP version, are you sure about your server configuration ? https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/ Using a hosting (https://www.guzel.net.tr/). I tried changing the PHP version while the problem was still going on but it didn't solve the problem. As I said, when I re-installed I wrote "localhost" in the Server section and the problem disappeared. I don't know if it's luck, I just wanted to write the way I tried. Link to comment Share on other sites More sharing options...
Matt75 Posted June 17, 2020 Share Posted June 17, 2020 Server configuration should be checked : https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/ We tested this version in several environnement, this issue is only caused by cache issue due to wrong server configuration Link to comment Share on other sites More sharing options...
Canozkan Posted June 17, 2020 Author Share Posted June 17, 2020 1 minute ago, Matt75 said: Server configuration should be checked : https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/ We tested this version in several environnement, this issue is only caused by cache issue due to wrong server configuration It may be because when I installed the same version in a different Hosting Company, I did not have any problems, as you said. Thank you for your help, I just wanted to share my solution Link to comment Share on other sites More sharing options...
saniaja Posted May 14, 2021 Share Posted May 14, 2021 On 6/17/2020 at 2:26 PM, dannielhendrix said: ok, at this solution I was referring that didn't work! Finally I just did the last part(rename ps_mbo folder to ps_mbo.bak in your modules folder.) and that's it Hi, thank you for your reply on this error. It solved my problem. Just renamed the folder and it worked fine! Link to comment Share on other sites More sharing options...
danielsaar Posted August 7, 2021 Share Posted August 7, 2021 (edited) Hi all, I can't turn off the Debug-Mode. "To turn on the Debug mode on PrestaShop 1.7 is more simple comparing it to the previous versions of Prestashop." Edit1: "If you are in production it can be useful to enable maintenance mode to avoid concomitant access to cache when cleaning or warmup." I want 1) No Cache 2) No Debug-Mode. What I can do? Or is this request stupid ? Edit2: I read something about the PS_SHOP_ENABLE and Maintenance mode. Where is the link between Maintenance mode / Debuging / Cache? yours Daniel Edited August 7, 2021 by danielsaar (see edit history) Link to comment Share on other sites More sharing options...
Matt75 Posted August 8, 2021 Share Posted August 8, 2021 Hi @danielsaar Your cache needs to be cleared, please use your FTP access to rename var/cache/prod to var/cache/prod.old then delete var/cache/prod.old (same for dev folder) 1 Link to comment Share on other sites More sharing options...
danielsaar Posted August 8, 2021 Share Posted August 8, 2021 Hi @Matt75 where is not any Folder under var/cache - I set caching off (until the page goes online). thanks Daniel Link to comment Share on other sites More sharing options...
Artur PL Posted January 19, 2022 Share Posted January 19, 2022 Thank you for this topic and solution - it helped! Link to comment Share on other sites More sharing options...
Ali Samie Posted July 30, 2022 Share Posted July 30, 2022 I have added these in a front controller and I get error 500. I have also cleared the cache $importer = SymfonyContainer::getInstance()->get('prestashop.core.import.importer'); $importConfigFactory = SymfonyContainer::getInstance()->get('prestashop.core.import.config_factory'); $runtimeConfigFactory = SymfonyContainer::getInstance()->get('prestashop.core.import.runtime_config_factory'); $importHandlerFinder = SymfonyContainer::getInstance()->get('prestashop.adapter.import.handler_finder'); 1 Link to comment Share on other sites More sharing options...
Ali Samie Posted July 30, 2022 Share Posted July 30, 2022 The issue is that global $kernel is null in this: /** * Get a singleton instance of SymfonyContainer. * * @return \Symfony\Component\DependencyInjection\ContainerInterface; */ public static function getInstance() { if (!isset(self::$instance)) { global $kernel; if (null !== $kernel && $kernel instanceof KernelInterface) { self::$instance = $kernel->getContainer(); } } return self::$instance; } Link to comment Share on other sites More sharing options...
Mercader Virtual Posted February 8, 2023 Share Posted February 8, 2023 (edited) Just clear cache. Save this script in a .sh file on the root prestashop folder. Then run the .sh file like: sh clearcache.sh #!/bin/bash base_dir='./' # Clear class index in case any override changed (usually not needed, that's why line is commented out). #rm ${base_dir}/cache/class_index.php declare -a cache_dirs=("cache/smarty/compile" "cache/smarty/cache" "cache/cachefs" "img/tmp" "themes/*/cache" "var/cache") # Clear all cache folder, ignoring 'index.php' for dir in "${cache_dirs[@]}" do echo Cleaning ${base_dir}/${dir}... find ${base_dir}/${dir} -type f ! -name index.php -delete done Edited February 8, 2023 by Mercader Virtual (see edit history) 1 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