Prestashop PHP Smarty Errors - prestashop

My error_log file keeps getting filled with this error and i don't know what is causing it. Any idea how i can find what is causing the error ?
[14-Aug-2020 13:20:32 Europe/Bucharest] PHP Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <--
thrown in /home/website/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177

It means somewhere in the code there is a variable called {$template} which is not defined. It could be theme templates or modules
I would use IDE to look for this variable. If this doesnt work just go for debuging technique, start where smarty starts rendering and go till place where it crashes :)
It looks like it is a dublicate for this question, maybe will help
SmartyException 0():Missing '$template' parameter with Prestashop

This also might be due to messed up module structure, its ModuleFrontControllers etc.
You can try to edit this file:
thrown in /home/website/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177
and check if you can log more informations about an error, file path etc.

Related

face Uncaught Syntax Error when check (add try-catch wrapping)

i face this error
The error I receive
here the file : https://igrafix.ir/wp-content/cache/autoptimize/autoptimize_c709febde8a57bd03504ae5fe6f38a57.php
when this option in photo Be checked above error happening. (site performance Improves 60%) But I encountered some problems ! like (Header menu doesn't load)
i tried : de active all plugins but doesn't work !?
solved by adding this Excluded JavaScript Code
/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js

How to make Vue error show the exact error source line in the code?

I am using Nuxt to develop an application.
Currently, when I ran into error, the stack trace looks like this.
This is very difficult to debug and find the error.
Is there any way to make it show the source file, the function, or the line that is causing the error?

Blocklayered module not working prestashop 1.6

I have a bug on my prestashop website that i don't know how to fix.
My blocklayered module is not working... I've tried refreshing cache and indexes and also restored the module with original one but it's not working... I've also setted permissions to 777 for all the folders and files of the module...
Here is the error line:
v_24_2e5bc2f239b0cac64f2bff372a426d98.js:4 GET https://www.bobo-sport.fr/modules/blocklayered/blocklayered-ajax.php?layered_category_12=12&id_category_layered=13&_=1532013197475 500 ()
You can see the problem on this page for exemple: https://www.bobo-sport.fr/13-soins
Could you please have a look to my problem?
Thanks a lot for your help! :)
Seems like a silly resolution but we had the same issue.
screenshot of blank line
Found the fix by total fluke.
In blocklayered.php remove the blank line on the top of the file.
Some apache configs manage this others not. Sometimes there is a hidden ascii value in there that throws an error of headers already sent.
One of our clever engineers spotted this after hours of searching.
Nearly killed us.
Hope this helps.

OpenCart auto complete broken on featured module

apologies if this has already been covered.
I have an issue where i can't add products to the featured module as the auto-complete doesn't find anything and never drops down. Is this something that's happened for any one else?
Currently using v1.5.6
Error shown in console after any action on the featured module admin page is...
"event.returnValue is deprecated. Please use the standard event.preventDefault() instead. "
OpenCarts error log shows...
'PHP Notice: Undefined variable: filter_category in /home/sites/cardboutique.ie/public_html/admin/controller/catalog/product.php on line 1434'
I've re-upped all the files (as it was working) but no joy.
I also doubt the first error is the main issue but don't have decent enough knowledge to vouch for that.

Mysterious FireBug Error repeats with ExtJS

When debugging ExtJS 4 (tried both versions 4.1.0 and 4.1.1), FireBug repeatedly shows the following error: An invalid or illegal string was specified
http://docs.sencha.com/ext-js/4-1/extjs/ext-all.js
Line 18. It does not break on the error, though that option is specified. Additionally, neither my code or ext-debug.js and it's loader seem to actually call ext-all.js.
This error gets logged to Firebug's console about once per minute, which is annoying. What bothers me is that I cannot get the error to go away. Is this a FireBug bug? An ExtJS bug? Aliens? How can I debug the debugger?
I had the same problem before and I've solved it by removing a special character at the end of my JS file! (app.js I think)
It was weird, but the problem came from hidden special characters like: Zero-width non-joiner or Right-to-left mark.
Open another JS file but do not copy/paste your code there. Just write it again and check whether the problem exists or not.
And don't forget to check your data if you have some. As this article explains about the problem: http://www.ashorlivs.fr/javascript-jquery/article/an-invalid-or-illegal-string-was
For general debugging see this link http://www.sencha.com/learn/debugging-ext-js-applications/
You can also use ext-all-dev.js while in development mode.
There is another excellent tool on top of firebug, at this link http://www.illuminations-for-developers.com/
PS: I still didn't figured out how to post a comment. I guess it comes when I have more points/reputation. Hence adding it as an answer. thanks.