tgiordmaina Posted August 19, 2016 Share Posted August 19, 2016 (edited) Hi developers, I need some help because I met some problem with an Error 500 on Suppliers and Manufacturer pages. What I do : I install a fresh release of prestashop_1.7 alpha 3 to test my addon. I configure nginx like this for the location "/" : location / { root /home/www-data/ptest/; autoindex on; index index.php index.html; rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$1$2.jpg last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg last; rewrite ^/c/([a-zA-Z-]+)/[a-zA-Z0-9-]+.jpg$ /img/c/$1.jpg last; rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg last; location /admin789afidgp/ { #Change this to your admin folder if (!-e $request_filename) { rewrite ^/.*$ /admin789afidgp/index.php last; #Change this to your admin folder } } try_files $uri $uri/ /index.php?$args; } When I try to print the demo Manufacturer or the demo Supplier I have this : ------------------------- 2016/08/11 16:55:26 [error] 11766#0: *85 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined property: SupplierController::$objectSerializer in /home/www-data/ptest/controllers/front/SupplierController.php on line 113PHP message: PHP Fatal error: Call to a member function toArray() on a non-object in /home/www-data/ptest/controllers/front/SupplierController.php on line 113" while reading response header from upstream, client: 10.0.2.2, server: , request: "GET /index.php?id_supplier=1&controller=supplier HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:7687", referrer: "http://127.0.0.1:7687/index.php"2016/08/11 16:55:27 [error] 11766#0: *87 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined property: ManufacturerController::$objectSerializer in /home/www-data/ptest/controllers/front/ManufacturerController.php on line 112PHP message: PHP Fatal error: Call to a member function toArray() on a non-object in /home/www-data/ptest/controllers/front/ManufacturerController.php on line 112" while reading response header from upstream, client: 10.0.2.2, server: , request: "GET /index.php?id_manufacturer=1&controller=manufacturer HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:7687", referrer: "http://127.0.0.1:7687/index.php" ------------------------- Someone have an idea or encountered this problem before ? Thank by advance, Best Regards, Thomas G. Edited August 19, 2016 by tgiordmaina (see edit history) Link to comment Share on other sites More sharing options...
tgiordmaina Posted August 19, 2016 Author Share Posted August 19, 2016 I fix it by replacing line 112 the original : 'manufacturer' => $this->objectSerializer->toArray($this->manufacturer), By : 'manufacturer' => get_object_vars($this->manufacturer), I don't know why this version of prestashop bug only for me with this parameter not initialized '$this->objectSerializer'. Link to comment Share on other sites More sharing options...
vekia Posted August 19, 2016 Share Posted August 19, 2016 it is still in development process so not every part of front office is ready, i think Link to comment Share on other sites More sharing options...
tgiordmaina Posted August 19, 2016 Author Share Posted August 19, 2016 (edited) Yes you have right, I think too.Moreover I encountered some other problems in back office, I can't install my addon, I will wait a real stable release to test and make my addons 1.7 compliant. Edited August 19, 2016 by tgiordmaina (see edit history) Link to comment Share on other sites More sharing options...
tgiordmaina Posted January 9, 2017 Author Share Posted January 9, 2017 I choose to use Apache2 instead of nginx for my developement so it works well with apache. Regards 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