Drens Posted October 18, 2017 Share Posted October 18, 2017 Hi, i have been looking into this bug recently and i cant patch it.There is some pages on back office (Products, Modules and so on) that a numer "1" appears at the top of the site and i cant find why. I open the developers console to inspect it and its just a number with spaces. I am worried about security issues or not sure, i havent published my website yet and also, i havent touched any file from admin folder. This issue just appeared randomly. Any help? Link to comment Share on other sites More sharing options...
Jean-Philippe Degert Posted October 21, 2017 Share Posted October 21, 2017 Hi, Same thing on one of my shop in 1.7.2.3. Impossible to make it disappear....!!! Link to comment Share on other sites More sharing options...
bellini13 Posted October 22, 2017 Share Posted October 22, 2017 (edited) There is some errant code and this is going to be very difficult to find. But I suspect that someone has edited a module or template file and accidentally placed the number 1, which is then appearing in the output. Unfortunately there is not an easy way to troubleshoot this, without stepping through the code and finding it Edited October 22, 2017 by bellini13 (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted October 22, 2017 Share Posted October 22, 2017 Also I see the very first css with href "unknown" which tends me to think bellinis answer is correct. Link to comment Share on other sites More sharing options...
phinq1910 Posted October 23, 2017 Share Posted October 23, 2017 not same on myself. Try check installed module on your site. Link to comment Share on other sites More sharing options...
capocopa Posted October 24, 2017 Share Posted October 24, 2017 Hi everyone i have the same error! i'm going crazy to find a way to remove that 1 i hope they can fix this in the next release.. i just updated now to 1.7.2.4 and the "1" is still there.. inspecting it with the browser doesn't give any information about.. Link to comment Share on other sites More sharing options...
bellini13 Posted October 24, 2017 Share Posted October 24, 2017 3 hours ago, capocopa said: i have the same error! i'm going crazy to find a way to remove that 1 i hope they can fix this in the next release.. i just updated now to 1.7.2.4 and the "1" is still there.. This is not an issue with Prestashop, this is an issue with a module or customization you have made to your store. Link to comment Share on other sites More sharing options...
Web VIZO Posted October 27, 2017 Share Posted October 27, 2017 Hello, Have you tried disabling non-prestashop modules and overrides? Best regards, Web Development VIZO. Link to comment Share on other sites More sharing options...
capocopa Posted November 25, 2017 Share Posted November 25, 2017 Hi i tried to disable all overrides and all non native modules.. and the 1 is still there of course i cleaned cache and changed browsers too i didn't any change to prestashop apart from theme and modules if anyone having the same issue has fixed it please let us know best regards Francesco Capodagli Link to comment Share on other sites More sharing options...
bellini13 Posted November 25, 2017 Share Posted November 25, 2017 The only way to fix it is to find the file that contains the number 1 in it. Likely from a module/theme you installed, or a file you changed (whether you did that intentionally or not, or with knowledge or not). Link to comment Share on other sites More sharing options...
Web VIZO Posted November 25, 2017 Share Posted November 25, 2017 34 minutes ago, capocopa said: Hi i tried to disable all overrides and all non native modules.. and the 1 is still there of course i cleaned cache and changed browsers too i didn't any change to prestashop apart from theme and modules if anyone having the same issue has fixed it please let us know best regards Francesco Capodagli The number "1" is a default behavior of Smarty when using the modifier "|print_r". In this case, what we can suggest you is download your store files and search in all files for the words "|print_r" in all "*.tpl" files. Best regards, Web Development VIZO. Link to comment Share on other sites More sharing options...
JazZ Posted November 29, 2017 Share Posted November 29, 2017 I have the same problem on Prestashop 1.7.2.3. I have documented all changes I have made to Prestashop files and i'm sure I have not added number one anywhere. So this must have come with a module or theme. Like mentioned above, it only appears on Catalog and Modules sections (maybe a few other, I can't check at the moment because now it's not there). On these pages the top left loading circle is also different for some reason. Strange thing is that it comes and goes randomly, Sometimes it's there, sometimes it's not. Does Prestashop still use Smarty if I have all options under CCC (COMBINE, COMPRESS AND CACHE) set to No? (Thats the only place I see Smarty mentioned) 1 Link to comment Share on other sites More sharing options...
bellini13 Posted November 30, 2017 Share Posted November 30, 2017 Prestashop still uses smarty, regardless of your option to use CCC, they are unrelated items. There is nothing we can do on the forums to help you with this, somewhere on your store a module or theme file has been updated to cause this issue. You could try going through all the module positions in the back office and removing them one by one to see which module and which module hook is causing the issue. Link to comment Share on other sites More sharing options...
MrPez Posted November 30, 2017 Share Posted November 30, 2017 In my store the problem was with the Paypal Module!!! On the modules/paypal.php on the function "hookDisplayBackOfficeHeader" I found this: if (!$bt_orders) { return true; } Configuration::updateValue('PAYPAL_CRON_TIME', date('Y-m-d H:i:s')); $method = AbstractMethodPaypal::load('BT'); $transactions = $method->searchTransactions($bt_orders); foreach ($transactions as $transaction) { $paypal_order_id = PaypalOrder::getIdOrderByTransactionId($transaction->id); $paypal_order = PaypalOrder::loadByOrderId($paypal_order_id); $ps_order = new Order($paypal_order_id); switch ($transaction->status) { case 'declined': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_ERROR')); break; case 'settled': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_PAYMENT')); break; default: // do nothing and check later one more time break; } $paypal_order->update(); } The correct code is: if (!$bt_orders) { //return true; }else{ Configuration::updateValue('PAYPAL_CRON_TIME', date('Y-m-d H:i:s')); $method = AbstractMethodPaypal::load('BT'); $transactions = $method->searchTransactions($bt_orders); foreach ($transactions as $transaction) { $paypal_order_id = PaypalOrder::getIdOrderByTransactionId($transaction->id); $paypal_order = PaypalOrder::loadByOrderId($paypal_order_id); $ps_order = new Order($paypal_order_id); switch ($transaction->status) { case 'declined': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_ERROR')); break; case 'settled': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_PAYMENT')); break; default: // do nothing and check later one more time break; } $paypal_order->update(); } } Link to comment Share on other sites More sharing options...
capocopa Posted December 18, 2017 Share Posted December 18, 2017 On 30/11/2017 at 2:41 PM, MrPez said: In my store the problem was with the Paypal Module!!! On the modules/paypal.php on the function "hookDisplayBackOfficeHeader" I found this: if (!$bt_orders) { return true; } Configuration::updateValue('PAYPAL_CRON_TIME', date('Y-m-d H:i:s')); $method = AbstractMethodPaypal::load('BT'); $transactions = $method->searchTransactions($bt_orders); foreach ($transactions as $transaction) { $paypal_order_id = PaypalOrder::getIdOrderByTransactionId($transaction->id); $paypal_order = PaypalOrder::loadByOrderId($paypal_order_id); $ps_order = new Order($paypal_order_id); switch ($transaction->status) { case 'declined': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_ERROR')); break; case 'settled': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_PAYMENT')); break; default: // do nothing and check later one more time break; } $paypal_order->update(); } The correct code is: if (!$bt_orders) { //return true; }else{ Configuration::updateValue('PAYPAL_CRON_TIME', date('Y-m-d H:i:s')); $method = AbstractMethodPaypal::load('BT'); $transactions = $method->searchTransactions($bt_orders); foreach ($transactions as $transaction) { $paypal_order_id = PaypalOrder::getIdOrderByTransactionId($transaction->id); $paypal_order = PaypalOrder::loadByOrderId($paypal_order_id); $ps_order = new Order($paypal_order_id); switch ($transaction->status) { case 'declined': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_ERROR')); break; case 'settled': $paypal_order->payment_status = $transaction->status; $ps_order->setCurrentState(Configuration::get('PS_OS_PAYMENT')); break; default: // do nothing and check later one more time break; } $paypal_order->update(); } } it doesn't work! i get error 500 with your code i hope that someone can find a solution.. i'm disabling all modules but i can't find which one cause this issue.. anyway it can't be a edit we did in our prestashop.. it's something that comes from a module because it's strange that different people do the same mistake in code editing Link to comment Share on other sites More sharing options...
TCB-Netherlands Posted December 19, 2017 Share Posted December 19, 2017 It is definitely in the Paypal module. When disabled the 1 is gone.! Link to comment Share on other sites More sharing options...
capocopa Posted December 22, 2017 Share Posted December 22, 2017 Hi everyone!! problem solved!! thanks to all of you guys!! the problem is infact paypal module! but also disabling it the error of "1" did not get fixed in my case... that's why i couldn't find the problem.. so i tried to completely UNINSTAL paypal and remove it's folder from modules trough ftp and after that i reinstalled it and configured it again and now it seems finally fixed! i noticed that after the last update with support for braintree the module configuration was buggy if you come from a precedent version.. so if you get the 1 let's try do this things! Thank you so much again to everybody and let's have a nice Christmas! Francesco Capodagli Link to comment Share on other sites More sharing options...
mmsh Posted December 23, 2017 Share Posted December 23, 2017 On 22/12/2017 at 9:47 PM, capocopa said: Hi everyone!! problem solved!! thanks to all of you guys!! the problem is infact paypal module! but also disabling it the error of "1" did not get fixed in my case... that's why i couldn't find the problem.. so i tried to completely UNINSTAL paypal and remove it's folder from modules trough ftp and after that i reinstalled it and configured it again and now it seems finally fixed! i noticed that after the last update with support for braintree the module configuration was buggy if you come from a precedent version.. so if you get the 1 let's try do this things! Thank you so much again to everybody and let's have a nice Christmas! Francesco Capodagli Hello, I'm not even using PayPal here and after the update to PS 1.6.1.17 I have this issue on FRONT page... What I need to inspect, please? and what's "braintree" ? Link to comment Share on other sites More sharing options...
capocopa Posted December 28, 2017 Share Posted December 28, 2017 Hi mmsh if you have this error in front office i think that it's not related to this problem the "1" in backoffice comes 100% sure from paypal+braintree module so your 1 must come from somewhere else for sure.. try inspecting your front office code to see if you can find informations about from where it comes Link to comment Share on other sites More sharing options...
guuds Posted December 29, 2017 Share Posted December 29, 2017 modules/paypal/paypal.php It's worked, only thing is change the function public function hookDisplayBackOfficeHeader() Remove " true " from the line, then it's work now if (!$bt_orders) { return true; } to if (!$bt_orders) { return; } 1 Link to comment Share on other sites More sharing options...
TCB-Netherlands Posted January 2, 2018 Share Posted January 2, 2018 Works Thx.! On 29-12-2017 at 1:50 AM, guuds said: modules/paypal/paypal.php It's worked, only thing is change the function public function hookDisplayBackOfficeHeader() Remove " true " from the line, then it's work now if (!$bt_orders) { return true; } to if (!$bt_orders) { return; } Link to comment Share on other sites More sharing options...
202ecommerce Posted January 3, 2018 Share Posted January 3, 2018 Hi, We will fix this issue in next release. it's available in a month. Best 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