public_html/classes/Dispatcher.php on line 513 error



  • After migration off my latest shop, I’m getting a new error.

    public_html/classes/Dispatcher.php on line 513
    [ThirtyBeesException]
    
    Missing template name
    at line 678 in file vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php
    
    673.     public function __get($property_name)
    674.     {
    675.         switch ($property_name) {
    676.             case 'source':
    677.                 if (strlen($this->template_resource) == 0) {
    678.                     throw new SmartyException('Missing template name');
    679.                 }
    680.                 $this->source = Smarty_Resource::source($this);
    681.                 // cache template object under a unique ID
    682.                 // do not cache eval resources
    683.                 if ($this->source->type != 'eval') {
    Smarty_Internal_Template->__get - [line 346 - vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource.php] - [1 Arguments]
    Smarty_Template_Cached->__construct - [line 707 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php] - [1 Arguments]
    Smarty_Internal_Template->__get - [line 410 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php] - [1 Arguments]
    Smarty_Internal_TemplateBase->isCached - [line 3094 - classes/module/Module.php] - [3 Arguments]
    ModuleCore->isCached - [line 73 - modules/productpaymentlogos/productpaymentlogos.php] - [2 Arguments]
    ProductPaymentLogos->hookDisplayProductButtons - [line 771 - classes/Hook.php] - [1 Arguments]
    HookCore::coreCallHook - [line 487 - classes/Hook.php] - [3 Arguments]
    HookCore::execWithoutCache - [line 280 - classes/Hook.php] - [7 Arguments]
    HookCore::exec - [line 322 - controllers/front/ProductController.php] - [2 Arguments]
    ProductControllerCore->initContent - [line 366 - classes/controller/Controller.php]
    ControllerCore->run - [line 43 - override/classes/controller/Controller.php]
    Controller->run - [line 743 - classes/Dispatcher.php]
    DispatcherCore->dispatch - [line 33 - index.php]```


  • Is this on the front end or the back end? Have you disabled overrides and third party modules and cleared your cache?



  • I noticed that the Smarty version that comes with tb is more strict. It can crash when a template it missing and it looks like one of the modules is missing a template.

    Could it be the payment logos block that’s missing a template?



  • It’s indeed the payment logos block. But how can i solve it?



  • i have fixed it.
    Delete the module and reinstalled.
    Now i can go to the product, but i see still the error
    Warning: Invalid argument supplied for foreach() in /home/…public_html/classes/Dispatcher.php on line 513



  • i see this error “Unexpected token < in JSON at position 0” if I want upload a picture in products.
    I think it’s related.



  • Unexpected token < in JSON at position 0

    Typically this is an Ajax request failing. Ajax requests expect an answer in JSON format and if this request sends back something like an error page (in HTML format, starting with < html >), you get this message.

    To find out what’s going on, open web developer console, network analysis section, and redo what triggers this malfunction. One of the requested pages listed in the developer console should have a Status higher than 400. Click on this and you’ll see what exactly was the answer. This answer should give a useful hint on what’s going wrong.

    This description matches Firefox’ web developer console, other browsers might do it a bit differently.



  • Nop no 400 found
    http://prestashop-38450-308782.cloudwaysapps.com/

    if i trigger the order button i’m getting this

    mpossible to add the product to the cart.
    textStatus: 'parsererror’
    errorThrown: 'SyntaxError: Unexpected token < in JSON at position 0’
    responseText:

    Warning: Invalid argument supplied for foreach() in /home/17442-38450.cloudwaysapps.com/…/public_html/classes/Dispatcher.php on line 513
    {“products”:[],“discounts”:[],“shippingCost”:"\u20ac\u00a00,00",“shippingCostFloat”:0,“wrappingCost”:"\u20ac\u00a00,00",“nbTotalProducts”:0,“total”:"\u20ac\u00a00,00",“productTotal”:"\u20ac\u00a00,00",“freeShipping”:"\u20ac\u00a01,00",“freeShippingFloat”:1,“hasError”:false}



  • Disabling debug mode should fix that, but there still seems to be a problem starting on line 513 of the Dispatcher



  • ow yes this is, of course, the debug mode. Thanks.



  • I don’t find what causes the error on line 513 in the Dispatcher.
    Somebody any idea?



  • Have you updated your shop to the latest 1.0.2 version?



  • yes all shops are running 1.0.2. I see i have this same problem with the other shop yarled.be
    The module Bpost shippingmanger is not working like it must be. I have spoken with the company that’s made the plugin and they say i must fix this problem and it will work.



  • Does the error go away when you disable that module?



  • Strange no it’s not going away.



  • If you disable 3rd party modules from the performance page does it go away? Also if you disable overrides from that same page does it go away?



  • yes it’s going away if i do this, but also my theme.



  • Ok, try just one or the other to see which one makes it go away. I am betting it is the override, something might be wrong with it.



  • i have removed all the overrides. Still there



  • Hmm, but when you disable the third party modules it goes away?


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.