musicmaster Posted October 19, 2018 Posted October 19, 2018 I made a modification in a query in classes/order/orderInvoice.php. I made some mistake in the process. The result was no error message (despite dev mode on). Instead I got a white page when I tried to generate an invoice or a delivery slip. Predictably it took me much longer to find out what caused this bug then would have happened if there had been an error message. So my questions are: why does this happen? And can this be fixed? BTW. What I did was that I replaced the function getProductsDetail() with the following: public function getProductsDetail() { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( (new DbQuery()) ->select('od.*,p.*,ps.*,m.name AS manufacturer') ->from('order_detail', 'od') ->leftJoin('product', 'p', 'p.`id_product` = od.`product_id`') ->leftJoin('product_shop', 'ps', 'ps.id_product = p.id_product AND ps.id_shop = od.id_shop') ->leftJoin('manufacturer', 'm', p.'id_manufacturer` = m.`id_manufacturer`') ->where('od.`id_order` = '.(int) $this->id_order) ->where($this->id && $this->number ? 'od.`id_order_invoice` = '.(int) $this->id : '') ->orderBy('od.`product_name`') ); } So I added a line for the manufacturer but in that line I put the quotes wrong.
Traumflug Posted October 20, 2018 Posted October 20, 2018 Blank page means some fundamental problem, like a syntax error. With code not even being executable, it can hardly send a meaningful error message to the browser. But Apache/Nginx/PHP-FPM have error logs. Usually somewhere in /var/log. There should be a good hint on what's going on.
musicmaster Posted October 20, 2018 Author Posted October 20, 2018 Nope. Nothing in the error logs either.
lesley Posted October 20, 2018 Posted October 20, 2018 The reason there was no error message is because you are generating a download file. The only way to debug that would be through the apache log likely.
musicmaster Posted October 20, 2018 Author Posted October 20, 2018 There is nothing in the Apache error log file either.
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