amusicsite Posted June 29, 2015 Share Posted June 29, 2015 I'm getting this error Notice: Undefined variable: req_uri in /.../public_html/override/classes/Dispatcher.php on line 357 Any ideas why? PrestaShop: 1.6.0.8 Link to comment Share on other sites More sharing options...
Jean.Lafonte Posted June 29, 2015 Share Posted June 29, 2015 Go on the file, on the line, and you will see ^^ ---------------------------------------------------------- My website : WunderX Link to comment Share on other sites More sharing options...
amusicsite Posted June 29, 2015 Author Share Posted June 29, 2015 Doh, forgot to post that.. $checkUrlTypeExistanceCMS = (int)$this->getKeyExistanceCMS($req_uri[1]); if ($checkUrlTypeExistanceCMS > 0 && !preg_match('/^\/blog.html*/', $this->request_uri) && !preg_match('/^\/blog*/', $this->request_uri)) { $controller = 'cms'; $_POST['id_cms'] = $checkUrlTypeExistanceCMS; } Link to comment Share on other sites More sharing options...
amusicsite Posted June 29, 2015 Author Share Posted June 29, 2015 Here is a more full error message from the front end when trying to add a product. Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: Unexpected token <' responseText: Notice: Undefined variable: req_uri in /var/www/dev.mywebsite/public_html/override/classes/Dispatcher.php on line 357 {"products":[{"id":9 "link":"http:\/\/dev.mywebsite\/index.php?product_rewrite=usb-11-rover-2850&controller=product" "quantity":1 "image":"http:\/\/dev.mywebsite\/img\/p\/7\/2\/72-home_default.jpg" "image_cart":"http:\/\/dev.mywebsite\/img\/p\/7\/2\/72-cart_default.jpg" "priceByLine":"\u00a370.00" "name":"USB 1.1 Rover 2850" "price":"\u00a370.00" "price_float":70 "idCombination":0 "idAddressDelivery":0 "is_gift":false "hasAttributes":false "hasCustomizedDatas":false "customizedDatas":[]}] "discounts":[] "shippingCost":"\u00a30.00" "shippingCostFloat":0 "wrappingCost":"\u00a30.00" "nbTotalProducts":1 "total":"\u00a370.00" "productTotal":"\u00a370.00" "freeShipping":"\u00a396.00" "freeShippingFloat":96 "hasError":false} Link to comment Share on other sites More sharing options...
amusicsite Posted June 29, 2015 Author Share Posted June 29, 2015 Actually, removing those if statement lines seems to have stopped the error without any obvious effect. Link to comment Share on other sites More sharing options...
bellini13 Posted June 30, 2015 Share Posted June 30, 2015 the question you should ask yourself is... why do you have this override to begin with 1 Link to comment Share on other sites More sharing options...
amusicsite Posted June 30, 2015 Author Share Posted June 30, 2015 Indeed, I presume it's one of the modules that has created it, is there any way to work out which one? Link to comment Share on other sites More sharing options...
bellini13 Posted July 1, 2015 Share Posted July 1, 2015 with any luck the code in the file says it, maybe a comment by the module author. otherwise no, you would have to go through your installed modules (using an ftp client), and locate one that has an override\classes\Dispatcher.php file in it. 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