Nishith Nesdiya Posted January 1, 2021 Share Posted January 1, 2021 Hi.. I am using hookDisplayAdminProductsExtra hook with create sympony form in my custom module. public function hookDisplayAdminProductsExtra($params) { $formFactory = $this->get('form.factory'); //More code } Above code is working fine for prestashop 1.7.6.9 but when i have upgrade prestashop 1.7.7.0 then its give me this type of error An exception has been thrown during the rendering of a template ("You have requested a non-existent service "form.factory"."). can any help me for solve this problem in prestashop prestashop 1.7.7.0 ? Thank you for your support Link to comment Share on other sites More sharing options...
Inter Svetainė Posted April 29, 2021 Share Posted April 29, 2021 On 1/1/2021 at 4:02 PM, Nishith said: Hi.. I am using hookDisplayAdminProductsExtra hook with create sympony form in my custom module. public function hookDisplayAdminProductsExtra($params) { $formFactory = $this->get('form.factory'); //More code } Above code is working fine for prestashop 1.7.6.9 but when i have upgrade prestashop 1.7.7.0 then its give me this type of error An exception has been thrown during the rendering of a template ("You have requested a non-existent service "form.factory"."). can any help me for solve this problem in prestashop prestashop 1.7.7.0 ? Thank you for your support Hi. Replace $this->get with PrestaShop\PrestaShop\Adapter\SymfonyContainer::getInstance()->get Your method have to look like this public function hookDisplayAdminProductsExtra($params) { $formFactory = PrestaShop\PrestaShop\Adapter\SymfonyContainer::getInstance()->get('form.factory'); //More code } Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted April 30, 2021 Author Share Posted April 30, 2021 Hi.. Thank you i will check asps Link to comment Share on other sites More sharing options...
Inter Svetainė Posted April 30, 2021 Share Posted April 30, 2021 7 hours ago, Nishith said: Hi.. Thank you i will check asps Should work. Using it a lot and many times fixed outdated modules. Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted July 22, 2021 Author Share Posted July 22, 2021 On 4/30/2021 at 4:54 PM, Inter Svetainė said: Should work. Using it a lot and many times fixed outdated modules. Hi.. Thank you its working fine Thank you for your help 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