500 error after importing products only on front office



  • This is the second time I’m posting this.
    I have and unexplained error that prevents me from accessing the front office. I can use the back office just fine though.

    Last time the error happened was when I clicked on “send email to customer for payment” in the back-office. Now it happened after a product import on a brand new clean install.

    What can I do to fix this? I checked the logs but nothing makes any sense.

    I get a lot of these in the nginx error log:
    2018/03/12 00:02:43 [error] 6711#6711: *257022 open() “/home/116193.cloudwaysapps.com/hfyfvckdre/public_html/913-small_default/boucle-d-oreille-epingle-poire-grand-modele-en-or-blanc-et-diamant-blanc-poire.jpg” failed (2: No such file or directory), client: 82.253.89.138, server: thirtybees-116193-439824.cloudwaysapps.com, request: “GET /913-small_default/boucle-d-oreille-epingle-poire-grand-modele-en-or-blanc-et-diamant-blanc-poire.jpg HTTP/1.1”, host: “thirtybees-116193-439824.cloudwaysapps.com”, referrer: “http://thirtybees-116193-439824.cloudwaysapps.com/administrator/index.php?controller=AdminProducts&id_product=294&updateproduct&token=6c8050a879f08b610f1a4ceadec7cd2f

    And this in the apache error log:
    [Sun Mar 11 23:48:36.462559 2018] [proxy_fcgi:error] [pid 1573] [client 127.0.0.1:56777] AH01071: Got error ‘PHP message: PHP Fatal error: Out of memory (allocated 263733248) (tried to allocate 127670514 bytes) in /home/116193.cloudwaysapps.com/hfyfvckdre/public_html/classes/Tools.php on line 1863\n’
    [Sun Mar 11 23:49:10.742126 2018] [proxy_fcgi:error] [pid 1541] [client 127.0.0.1:56744] AH01068: Got bogus version 118
    [Sun Mar 11 23:49:10.743691 2018] [proxy_fcgi:error] [pid 1541] (22)Invalid argument: [client 127.0.0.1:56744] AH01075: Error dispatching request to : (passing brigade to output filters)
    [Sun Mar 11 23:49:19.330212 2018] [proxy_fcgi:error] [pid 1555] [client 127.0.0.1:56761] AH01068: Got bogus version 118
    [Sun Mar 11 23:49:19.330397 2018] [proxy_fcgi:error] [pid 1555] (22)Invalid argument: [client 127.0.0.1:56761] AH01075: Error dispatching request to : (passing brigade to output filters)
    [Sun Mar 11 23:49:24.647231 2018] [proxy_fcgi:error] [pid 1560] [client 127.0.0.1:56766] AH01068: Got bogus version 118
    [Sun Mar 11 23:49:24.648302 2018] [proxy_fcgi:error] [pid 1560] (22)Invalid argument: [client 127.0.0.1:56766] AH01075: Error dispatching request to : (passing brigade to output filters)
    [Sun Mar 11 23:49:24.943241 2018] [proxy_fcgi:error] [pid 1569] [client 127.0.0.1:56772] AH01068: Got bogus version 118
    [Sun Mar 11 23:49:24.943450 2018] [proxy_fcgi:error] [pid 1569] (22)Invalid argument: [client 127.0.0.1:56772] AH01075: Error dispatching request to : (passing brigade to output filters)
    [Sun Mar 11 23:57:46.226429 2018] [proxy_fcgi:error] [pid 1685] [client 127.0.0.1:57188] AH01071: Got error ‘PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 266420224 bytes) in /home/116193.cloudwaysapps.com/hfyfvckdre/public_html/classes/exception/PrestaShopException.php on line 240\nPHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 266260480 bytes) in Unknown on line 0\n’, referer: http://thirtybees-116193-439824.cloudwaysapps.com/administrator/index.php?controller=AdminProducts&id_product=1&updateproduct&token=6c8050a879f08b610f1a4ceadec7cd2f
    [Mon Mar 12 00:07:47.821186 2018] [proxy_fcgi:error] [pid 2276] [client 127.0.0.1:57370] AH01071: Got error ‘PHP message: PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 473364304 bytes) in /home/116193.cloudwaysapps.com/hfyfvckdre/public_html/classes/exception/PrestaShopException.php on line 240\nPHP message: PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 473366528 bytes) in Unknown on line 0\n’, referer: http://thirtybees-116193-439824.cloudwaysapps.com/administrator/index.php?controller=AdminProducts&id_product=294&updateproduct&token=6c8050a879f08b610f1a4ceadec7cd2f
    [Mon Mar 12 00:08:34.181543 2018] [proxy_fcgi:error] [pid 2788] [client 127.0.0.1:57380] AH01071: Got error ‘PHP message: PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 473364304 bytes) in /home/116193.cloudwaysapps.com/hfyfvckdre/public_html/classes/exception/PrestaShopException.php on line 240\nPHP message: PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 473366528 bytes) in Unknown on line 0\n’

    I’m on cloudways hosting.
    What can I do? I’m getting pretty desperate



  • Looks like your missing images to your products, and you need to allocate more php memory (memory_limit). Do you know your memory_limit setting right now?



  • How many products did you import? That is a lot of memory that it is using.



  • The images are all there in the back-office. I’ll try adding more memory but I don’t understand why it’s still down.

    I imported about 1500 products out of 24000 total so this is a major issue for me.



  • 24000 is a lot of products, maybe try it in chunks, of like 1300 or something?



  • Yes that’s why I imported 1500 products



  • and…what was your memory_limit set at?



  • It was too low, so I set it higher and it seems to be working.
    But not really, I cloned the application to use it as a test app and the same thing happened only this time not during an import but when creating employees!
    This is the third time I’m seeing this bug.

    @lesley I could really use some urgent help, this is crazy.

    Again, here’s the apache error log of the newly cloned app :
    Undefined offset: 110 in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/cache/smarty/compile/90/62/fd/9062fda1f78ce1110c38d3da8d86f60c2e06e35e.file.form.tpl.php on line 383\nPHP message: PHP Notice: Undefined offset: 110 in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/cache/smarty/compile/90/62/fd/9062fda1f78ce1110c38d3da8d86f60c2e06e35e.file.form.tpl.php on line 387\n’, referer: http://thirtybees-116193-454588.cloudwaysapps.com/administrator/index.php?controller=AdminEmployees&id_employee=5&conf=4&token=abd704ba608e0b351f48d2b741d40b88
    [Mon Mar 12 17:00:21.577437 2018] [proxy_fcgi:error] [pid 30949] [client 127.0.0.1:53302] AH01071: Got error 'PHP message: PHP Warning: file(/home/116193.cloudwaysapps.com/ptbdceufjv/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code): failed to open stream: No such file or directory in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/classes/exception/PrestaShopException.php on line 184\nPHP message: PHP Warning: array_slice() expects parameter 1 to be array, boolean given in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/classes/exception/PrestaShopException.php on line 191\nPHP message: PHP Warning: Invalid argument supplied for foreach() in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/classes/exception/PrestaShopException.php on line 198\nPHP message: PHP Warning: file(/home/116193.cloudwaysapps.com/ptbdceufjv/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()‘d code): failed to open stream: No such file or directory in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/classes/exception/PrestaShopException.php on line 184\nPHP message: PHP Warning: array_slice() expects parameter 1 to be array, boolean given in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/classes/exception/PrestaShopException.php on line 191\nPHP message: PHP Warning: Invalid argument supplied for foreach() in /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/classes/exception/PrestaShopException.php on line 198\n’, referer: http://thirtybees-116193-454588.cloudwaysapps.com/administrator/index.php?controller=AdminProfiles&id_profile=4&conf=4&token=4e4216c62d50e1276da7f71ebb81b1c7

    And the nginx error log:
    2018/03/12 16:59:01 [error] 29530#29530: *5204 open() “/home/116193.cloudwaysapps.com/ptbdceufjv/public_html/administrator/themes/img/select2x2.png” failed (2: No such file or directory), client: 82.253.89.138, server: thirtybees-116193-454588.cloudwaysapps.com, request: “GET /administrator/themes/img/select2x2.png HTTP/1.1”, host: “thirtybees-116193-454588.cloudwaysapps.com”, referrer: "http://thirtybees-116193-454588.cloudwaysapps.com/administrator/themes/default/css/admin-theme.css"
    2018/03/12 16:59:57 [error] 29530#29530: *5281 open() “/home/116193.cloudwaysapps.com/ptbdceufjv/public_html/favicon.ico” failed (2: No such file or directory), client: 82.253.89.138, server: thirtybees-116193-454588.cloudwaysapps.com, request: “GET /favicon.ico HTTP/1.1”, host: “thirtybees-116193-454588.cloudwaysapps.com”, referrer: “http://thirtybees-116193-454588.cloudwaysapps.com/administrator/index.php?controller=AdminProfiles&id_profile=4&conf=4&token=55de7b455aa2153a87016c1f9dbfbbcc



  • Those are notices, not errors. Is the account being created? Or is it white screening?



  • The back-office works perfectly but the front office looks like this
    This



  • Copy the error message and paste it in the log area in the back office and let us know the output.



  • This is what it says :

    ## ThirtyBeesException  
    **Syntax error in template "/home/116193.cloudwaysapps.com/ptbdceufjv/public_html/themes/warehouse/modules/blockcurrencies/blockcurrencies.tpl"  on line 41 "{assign var="currency_name" value={l s='%s (%s)' sprintf=[$f_currency.name, $f_currency.iso_code}"  - Unexpected "}", expected one of: "","" , "]"**  
     *at line* **41** *in file* `vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php`  
    ```php  
    36.         *
    37.         * @var bool
    38.         */
    39.        public $suppressMergedTemplates = false;
    40.    
    41. =>     /**
    42.         * compile tag objects
    43.         *
    44.         * @var array
    45.         */
    46.        public static $_tag_objects = array();
    
    • Smarty_Internal_TemplateCompilerBase->trigger_template_error - [line 4435 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php]
    4430.        {
    4431.            #line 78 "smarty_internal_templateparser.y"
    4432.    
    4433.            $this->internalError = true;
    4434.            $this->yymajor = $yymajor;
    4435. =>         $this->compiler->trigger_template_error();
    4436.            #line 3133 "smarty_internal_templateparser.php"
    4437.        }
    4438.    
    4439.        public function yy_accept()
    4440.        {
    
    • Smarty_Internal_Templateparser->yy_syntax_error - [line 4501 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php]
    • [2 Arguments]
    4496.                        fprintf($this->yyTraceFILE, "%sSyntax Error!\n",
    4497.                                $this->yyTracePrompt);
    4498.                    }
    4499.                    if (self::YYERRORSYMBOL) {
    4500.                        if ($this->yyerrcnt < 0) {
    4501. =>                         $this->yy_syntax_error($yymajor, $yytokenvalue);
    4502.                        }
    4503.                        $yymx = $this->yystack[$this->yyidx]->major;
    4504.                        if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) {
    4505.                            if ($this->yyTraceFILE) {
    4506.                                fprintf($this->yyTraceFILE, "%sDiscard input token %s\n",
    
    3
    Argument [1]  
    }
    
    • Smarty_Internal_Templateparser->doParse - [line 118 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php]
    • [2 Arguments]
    113.            while ($this->lex->yylex() && !$this->abort_and_recompile) {
    114.                if ($this->smarty->_parserdebug) {
    115.                    echo "<pre>Line {$this->lex->line} Parsing  {$this->parser->yyTokenName[$this->lex->token]} Token " .
    116.                        htmlentities($this->lex->value) . "</pre>";
    117.                }
    118. =>             $this->parser->doParse($this->lex->token, $this->lex->value);
    119.            }
    120.    
    121.            if ($this->abort_and_recompile) {
    122.                // exit here on abort
    123.                return false;
    
    3
    Argument [1]  
    }
    
    • Smarty_Internal_SmartyTemplateCompiler->doCompile - [line 283 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php]
    • [1 Arguments]
    278.                        // run prefilter if required
    279.                        if ((isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) && !$this->suppressFilter) {
    280.                            $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template);
    281.                        }
    282.                        // call compiler
    283. =>                     $_compiled_code = $this->doCompile($_content);
    284.                    }
    285.                } while ($this->abort_and_recompile);
    286.                if ($this->smarty->debugging) {
    287.                    Smarty_Internal_Debug::end_compile($this->template);
    288.                }
    
    {*
    * 2007-2014 PrestaShop
    *
    * NOTICE OF LICENSE
    *
    * This source file is subject to the Academic Free License (AFL 3.0)
    * that is bundled with this package in the file LICENSE.txt.
    * It is also available through the world-wide-web at this URL:
    * http://opensource.org/licenses/afl-3.0.php
    * If you did not receive a copy of the license and are unable to
    * obtain it through the world-wide-web, please send an email
    * to license@prestashop.com so we can send you a copy immediately.
    *
    * DISCLAIMER
    *
    * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
    * versions in the future. If you wish to customize PrestaShop for your
    * needs please refer to http://www.prestashop.com for more information.
    *
    *  @author PrestaShop SA 
    *  @copyright  2007-2014 PrestaShop SA
    *  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
    *  International Registered Trademark &amp; Property of PrestaShop SA
    *}
    
    {if count($currencies) &gt; 1}
    	
    		
    			
    				
    				
    				
    				{l s=&#039;Currency&#039; mod=&#039;blockcurrencies&#039;}
    				{foreach from=$currencies key=k item=f_currency}
    					{if $cookie-&gt;id_currency == $f_currency.id_currency}{/if}
    				{/foreach}
    			
    			
    				{foreach from=$currencies key=k item=f_currency}
    				{if strpos($f_currency.name, &#039;(&#039;|cat:$f_currency.iso_code:&#039;)&#039;) === false}
    						{assign var=&quot;currency_name&quot; value={l s=&#039;%s (%s)&#039; sprintf=[$f_currency.name, $f_currency.iso_code}
    					{else}
    						{assign var=&quot;currency_name&quot; value=$f_currency.name}
    					{/if}
    					id_currency == $f_currency.id_currency}class=&quot;selected&quot;{/if}&gt;
    						
    							{$f_currency.sign} - {$f_currency.iso_code}
    						
    					
    				{/foreach}
    			
    		
    	
    {/if}
    
    
    • Smarty_Internal_TemplateCompilerBase->compileTemplate - [line 197 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php]
    • [1 Arguments]
    192.                    touch($this->compiled->filepath);
    193.                }
    194.            }
    195.            // call compiler
    196.            try {
    197. =>             $code = $this->compiler->compileTemplate($this);
    198.            }
    199.            catch (Exception $e) {
    200.                // restore old timestamp in case of error
    201.                if ($this->smarty->compile_locking && !$this->source->recompiled && $saved_timestamp) {
    202.                    touch($this->compiled->filepath, $saved_timestamp);
    
    
    
    • Smarty_Internal_Template->compileTemplateSource - [line 155 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php]
    150.                            ob_get_clean();
    151.                            throw $e;
    152.                        }
    153.                    } else {
    154.                        if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) {
    155. =>                         $_template->compileTemplateSource();
    156.                            $code = file_get_contents($_template->compiled->filepath);
    157.                            eval("?>" . $code);
    158.                            unset($code);
    159.                            $_template->compiled->loaded = true;
    160.                            $_template->compiled->isCompiled = true;
    
    • Smarty_Internal_TemplateBase->fetch - [line 424 - classes/SmartyCustom.php]
    • [7 Arguments]
    419.            } else {
    420.                $count = 0;
    421.                $maxTries = 3;
    422.                while (true) {
    423.                    try {
    424. =>                     $tpl = parent::fetch($template, $cacheId, $compileId, $parent, $display, $mergeTplVars, $noOutputFilter);
    425.                        break;
    426.                    } catch (SmartyException $e) {
    427.                        // handle exception
    428.                        if (++$count === $maxTries) {
    429.                            throw $e;
    
    
    Argument [1]  
    
    Argument [2]  
    
    Argument [3]  
    
    Argument [4]  
    
    Argument [5]  
    1
    Argument [6]  
    
    
    • Smarty_Custom_Template->fetch - [line 2965 - classes/module/Module.php]
    2960.    
    2961.                if ($cache_id !== null) {
    2962.                    Tools::enableCache();
    2963.                }
    2964.    
    2965. =>             $result = $this->getCurrentSubTemplate($template, $cache_id, $compile_id)->fetch();
    2966.    
    2967.                if ($cache_id !== null) {
    2968.                    Tools::restoreCacheSettings();
    2969.                }
    2970.    
    
    • ModuleCore->display - [line 74 - modules/blockcurrencies/blockcurrencies.php]
    • [2 Arguments]
    69.    	* @return string Content
    70.    	*/
    71.    	public function hookDisplayTop($params)
    72.    	{
    73.    		if ($this->_prepareHook($params))
    74. => 			return $this->display(__FILE__, 'blockcurrencies.tpl');
    75.    	}
    76.    
    77.    	public function hookDisplayNav($params)
    78.    	{
    79.    			return $this->hookDisplayTop($params);
    
    /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/modules/blockcurrencies/blockcurrencies.php
    Argument [1]  
    blockcurrencies.tpl
    
    • BlockCurrencies->hookDisplayTop - [line 79 - modules/blockcurrencies/blockcurrencies.php]
    • [1 Arguments]
    74.    			return $this->display(__FILE__, 'blockcurrencies.tpl');
    75.    	}
    76.    
    77.    	public function hookDisplayNav($params)
    78.    	{
    79. => 			return $this->hookDisplayTop($params);
    80.    	}
    81.    
    82.    	public function hookDisplayHeader($params)
    83.    	{
    84.    		if (Configuration::get('PS_CATALOG_MODE'))
    
    
    
    • BlockCurrencies->hookDisplayNav - [line 771 - classes/Hook.php]
    • [1 Arguments]
    766.                }
    767.            }
    768.    
    769.            // Immediately return the result if we do not log performances
    770.            if (!Module::$_log_modules_perfs) {
    771. =>             return $module->{$method}($params);
    772.            }
    773.    
    774.            // Store time and memory before and after hook call and save the result in the database
    775.            $timeStart = microtime(true);
    776.            $memoryStart = memory_get_usage(true);
    
    
    
    • HookCore::coreCallHook - [line 487 - classes/Hook.php]
    • [3 Arguments]
    482.                        Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit);
    483.                    }
    484.    
    485.                    // Call hook method
    486.                    if ($hookCallable) {
    487. =>                     $display = Hook::coreCallHook($moduleInstance, 'hook'.$hookName, $hookArgs);
    488.                    } elseif ($hookRetroCallable) {
    489.                        $display = Hook::coreCallHook($moduleInstance, 'hook'.$retroHookName, $hookArgs);
    490.                    }
    491.    
    492.                    // Live edit
    
    
    Argument [1]  
    hookdisplayNav
    Argument [2]  
    
    
    • HookCore::execWithoutCache - [line 280 - classes/Hook.php]
    • [7 Arguments]
    275.            $checkExceptions = true,
    276.            $usePush = false,
    277.            $idShop = null
    278.        ) {
    279.            if (!Configuration::get('TB_PAGE_CACHE_ENABLED')) {
    280. =>             return static::execWithoutCache($hookName, $hookArgs, $idModule, $arrayReturn, $checkExceptions, $usePush, $idShop);
    281.            }
    282.    
    283.            $activehooks = json_decode(Configuration::get('TB_PAGE_CACHE_HOOKS'), true);
    284.    
    285.            $found = false;
    
    displayNav
    Argument [1]  
    
    Argument [2]  
    
    Argument [3]  
    
    Argument [4]  
    1
    Argument [5]  
    
    Argument [6]  
    
    
    • HookCore::exec - [line 211 - config/smarty.config.inc.php]
    • [3 Arguments]
    206.                    return '';
    207.                }
    208.                unset($hook_params['mod']);
    209.            }
    210.            unset($hook_params['h']);
    211. =>         return Hook::exec($params['h'], $hook_params, $id_module);
    212.        }
    213.    }
    214.    
    215.    function smartyCleanHtml($data)
    216.    {
    
    displayNav
    Argument [1]  
    
    Argument [2]  
    
    
    • smartyHook - [line 274 - config/smarty.config.inc.php]
    • [2 Arguments]
    269.                    } else {
    270.                        $args[] = &$arguments[$a];
    271.                    }
    272.                }
    273.    
    274. =>             return call_user_func_array($item, $args);
    275.            }
    276.        }
    277.    
    278.        public static function getInstance()
    279.        {
    
    Array
    (
        [h] =&gt; displayNav
    )
    
    Argument [1]  
    
    
    • SmartyLazyRegister->__call - [line 234 - cache/smarty/compile/01/23/f6/0123f68aa74b5ce24ad2e842be36d0dbb1dcbcff.file.header.tpl.php]
    • [2 Arguments]
    229.    					<?php if (isset($_smarty_tpl->tpl_vars['warehouse_vars']->value['top_width'])&&$_smarty_tpl->tpl_vars['warehouse_vars']->value['top_width']==1&&$_smarty_tpl->tpl_vars['warehouse_vars']->value['top_bar']) {?>
    230.    				<div class="nav">
    231.    					<div class="container">
    232.    						<div class="row">
    233.    							<nav>
    234. => 								<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>"displayNav"),$_smarty_tpl);?>
    235.    
    236.    								<?php echo $_smarty_tpl->getSubTemplate ("./product-compare.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
    237.    
    238.    								<?php if (isset($_smarty_tpl->tpl_vars['warehouse_vars']->value['wishlist_status'])&&$_smarty_tpl->tpl_vars['warehouse_vars']->value['wishlist_status']) {?><a href="<?php echo $_smarty_tpl->tpl_vars['link']->value->getModuleLink('blockwishlist','mywishlist',array(),true);?>
    239.    " title="<?php echo smartyTranslate(array('s'=>'My wishlist'),$_smarty_tpl);?>
    
    smartyHook
    Argument [1]  
    
    
    • content_5aa6b21936f823_07157278 - [line 188 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php]
    • [1 Arguments]
    183.                            }
    184.                            array_unshift($_template->_capture_stack, array());
    185.                            //
    186.                            // render compiled template
    187.                            //
    188. =>                         $_template->properties['unifunc']($_template);
    189.                            // any unclosed {capture} tags ?
    190.                            if (isset($_template->_capture_stack[0][0])) {
    191.                                $_template->capture_error();
    192.                            }
    193.                            array_shift($_template->_capture_stack);
    
    
    
    • Smarty_Internal_TemplateBase->fetch - [line 424 - classes/SmartyCustom.php]
    • [7 Arguments]
    419.            } else {
    420.                $count = 0;
    421.                $maxTries = 3;
    422.                while (true) {
    423.                    try {
    424. =>                     $tpl = parent::fetch($template, $cacheId, $compileId, $parent, $display, $mergeTplVars, $noOutputFilter);
    425.                        break;
    426.                    } catch (SmartyException $e) {
    427.                        // handle exception
    428.                        if (++$count === $maxTries) {
    429.                            throw $e;
    
    
    Argument [1]  
    
    Argument [2]  
    
    Argument [3]  
    
    Argument [4]  
    
    Argument [5]  
    
    Argument [6]  
    1
    
    • Smarty_Custom_Template->fetch - [line 303 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php]
    • [7 Arguments]
    298.                foreach ($data as $_key => $_val) {
    299.                    $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
    300.                }
    301.            }
    302.    
    303. =>         return $tpl->fetch(null, null, null, null, false, false, true);
    304.        }
    305.    
    306.        /**
    307.         * Template code runtime function to set up an inline subtemplate
    308.         *
    
    
    Argument [1]  
    
    Argument [2]  
    
    Argument [3]  
    
    Argument [4]  
    
    Argument [5]  
    
    Argument [6]  
    1
    
    • Smarty_Internal_Template->getSubTemplate - [line 38 - cache/smarty/compile/4c/0c/7f/4c0c7facbe770fa85fba8e895b5df9de0146231c.file.layout.tpl.php]
    • [7 Arguments]
    33.    ),false); /*/%%SmartyHeaderCode%%*/?>
    34.    <?php if ($_valid && !is_callable('content_5aa6b2191e4bf7_53061213')) {function content_5aa6b2191e4bf7_53061213($_smarty_tpl) {?>
    35.    <?php $_smarty_tpl->tpl_vars['left_column_size'] = new Smarty_variable(0, null, 0);?><?php $_smarty_tpl->tpl_vars['right_column_size'] = new Smarty_variable(0, null, 0);?>
    36.    <?php if (isset($_smarty_tpl->tpl_vars['HOOK_LEFT_COLUMN']->value)&&trim($_smarty_tpl->tpl_vars['HOOK_LEFT_COLUMN']->value)&&!$_smarty_tpl->tpl_vars['hide_left_column']->value) {?><?php $_smarty_tpl->tpl_vars['left_column_size'] = new Smarty_variable(3, null, 0);?><?php }?>
    37.    <?php if (isset($_smarty_tpl->tpl_vars['HOOK_RIGHT_COLUMN']->value)&&trim($_smarty_tpl->tpl_vars['HOOK_RIGHT_COLUMN']->value)&&!$_smarty_tpl->tpl_vars['hide_right_column']->value) {?><?php $_smarty_tpl->tpl_vars['right_column_size'] = new Smarty_variable(3, null, 0);?><?php }?>
    38. => <?php if (!empty($_smarty_tpl->tpl_vars['display_header']->value)) {?><?php echo $_smarty_tpl->getSubTemplate (((string)$_smarty_tpl->tpl_vars['tpl_dir']->value)."./header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('HOOK_HEADER'=>$_smarty_tpl->tpl_vars['HOOK_HEADER']->value), 0);?>
    39.    <?php }?>
    40.    <?php if (!empty($_smarty_tpl->tpl_vars['template']->value)) {?><?php echo $_smarty_tpl->tpl_vars['template']->value;?>
    41.    <?php }?>
    42.    <?php if (!empty($_smarty_tpl->tpl_vars['display_footer']->value)) {?><?php echo $_smarty_tpl->getSubTemplate (((string)$_smarty_tpl->tpl_vars['tpl_dir']->value)."./footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
    43.    <?php }?>
    
    /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/themes/warehouse/./header.tpl
    Argument [1]  
    
    Argument [2]  
    
    Argument [3]  
    0
    Argument [4]  
    
    Argument [5]  
    Array
    (
        [HOOK_HEADER] =&gt; 
      (function () {
        function initPayPalJs() {
          if (typeof $ === &#039;undefined&#039;
            || !$(&#039;#payment_paypal_express_checkout&#039;).length
            || typeof window.paypal === &#039;undefined&#039;
            || typeof window.paypal.checkout === &#039;undefined&#039;
          ) {
            setTimeout(initPayPalJs, 100);
            return;
          }
    
          function updateFormDatas() {
            var nb = $(&#039;#quantity_wanted&#039;).val();
            var id = $(&#039;#idCombination&#039;).val();
    
            $(&#039;#paypal_payment_form input[name=quantity]&#039;).val(nb);
            $(&#039;#paypal_payment_form input[name=id_product_attribute]&#039;).val(id);
          }
    
          $(&#039;body&#039;).on(&#039;submit&#039;, &quot;#paypal_payment_form&quot;, updateFormDatas);
    
          $(&#039;#container_express_checkout&#039;).empty();
          paypal.Button.render({
            env: &#039;sandbox&#039;, // Optional: specify &#039;sandbox&#039; environment
            locale: &#039;fr_FR&#039;,
            payment: function (resolve, reject) {
                                // Then create a payment
                    paypal.request.post(&#039;http://thirtybees-116193-454588.cloudwaysapps.com/fr/module/paypal/incontextajax&#039;, {
                      requestForInContext: true,
                    })
                      .then(function (data) {
                        resolve(data.paymentID);
                      })
                      .catch(function (err) {
                        reject(err);
                      });
                              },
            onAuthorize: function (data) {
              var EXECUTE_PAYMENT_URL = &#039;http://thirtybees-116193-454588.cloudwaysapps.com/fr/module/paypal/incontextvalidate&#039;;
              paypal.request.post(EXECUTE_PAYMENT_URL, {
                paymentID: data.paymentID,
                payerID: data.payerID
              })
                .then(function (data) {
                  if (data.success) {
                    window.location.replace(data.confirmUrl);
                    return;
                  } else {
                    alert(&#039;fail&#039;);
                  }
                })
                .catch(function (err) {
                  alert(&#039;Payment failure&#039;);
                });
            }
    
          }, &#039;#container_express_checkout&#039;);
    
            
            
          var confirmTimer = false;
    
          if ($(&#039;form[target=&quot;hss_iframe&quot;]&#039;).length == 0) {
            if ($(&#039;select[name^=&quot;group_&quot;]&#039;).length &gt; 0) {
              displayExpressCheckoutShortcut();
            }
    
            return false;
          } else {
            checkOrder();
          }
    
          function checkOrder() {
            if (confirmTimer == false) {
              confirmTimer = setInterval(getOrdersCount, 1000);
            }
          }
    
                }
    
        initPayPalJs();
      })();
    
    
    
    
    
    
    )
    
    Argument [6]  
    0
    
    • content_5aa6b2191e4bf7_53061213 - [line 188 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php]
    • [1 Arguments]
    183.                            }
    184.                            array_unshift($_template->_capture_stack, array());
    185.                            //
    186.                            // render compiled template
    187.                            //
    188. =>                         $_template->properties['unifunc']($_template);
    189.                            // any unclosed {capture} tags ?
    190.                            if (isset($_template->_capture_stack[0][0])) {
    191.                                $_template->capture_error();
    192.                            }
    193.                            array_shift($_template->_capture_stack);
    
    
    
    • Smarty_Internal_TemplateBase->fetch - [line 166 - classes/SmartyCustom.php]
    • [7 Arguments]
    161.         */
    162.        public function fetch($template = null, $cacheId = null, $compileId = null, $parent = null, $display = false, $mergeTplVars = true, $noOutputFilter = false)
    163.        {
    164.            $this->check_compile_cache_invalidation();
    165.    
    166. =>         return parent::fetch($template, $cacheId, $compileId, $parent, $display, $mergeTplVars, $noOutputFilter);
    167.        }
    168.    
    169.        /**
    170.         * Check the compile cache needs to be invalidated (multi front + local cache compatible)
    171.         *
    
    /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/themes/warehouse/layout.tpl
    Argument [1]  
    
    Argument [2]  
    
    Argument [3]  
    
    Argument [4]  
    
    Argument [5]  
    1
    Argument [6]  
    
    
    • SmartyCustomCore->fetch - [line 34 - override/classes/controller/Controller.php]
    • [1 Arguments]
    29.                    $html .= $this->context->smarty->fetch($tpl);
    30.                }
    31.            }
    32.            else
    33.            {
    34. =>             $html = $this->context->smarty->fetch($content);
    35.            }
    36.            $html = trim($html);
    37.            if (in_array($this->controller_type, array(
    38.                    'front',
    39.                    'modulefront'
    
    /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/themes/warehouse/layout.tpl
    
    • Controller->smartyOutputContent - [line 711 - classes/controller/FrontController.php]
    • [1 Arguments]
    706.         * @version 1.0.0 Initial version
    707.         */
    708.        protected function smartyOutputContent($content)
    709.        {
    710.            if (!Configuration::get('TB_PAGE_CACHE_ENABLED')) {
    711. =>             parent::smartyOutputContent($content);
    712.    
    713.                return;
    714.            }
    715.    
    716.            $html = '';
    
    /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/themes/warehouse/layout.tpl
    
    • FrontControllerCore->smartyOutputContent - [line 957 - classes/controller/FrontController.php]
    • [1 Arguments]
    952.                    $this->displayContent();
    953.                    $template = ob_get_contents();
    954.                    ob_clean();
    955.                }
    956.                $this->context->smarty->assign('template', $template);
    957. =>             $this->smartyOutputContent($layout);
    958.            } else {
    959.                Tools::displayAsDeprecated('layout.tpl is missing in your theme directory');
    960.                if ($this->display_header) {
    961.                    $this->smartyOutputContent(_PS_THEME_DIR_.'header.tpl');
    962.                }
    
    /home/116193.cloudwaysapps.com/ptbdceufjv/public_html/themes/warehouse/layout.tpl
    
    • FrontControllerCore->display - [line 384 - classes/controller/Controller.php]
    379.                            $this->{'displayAjax'.$action}();
    380.                        } elseif (method_exists($this, 'displayAjax')) {
    381.                            $this->displayAjax();
    382.                        }
    383.                    } else {
    384. =>                     $this->display();
    385.                    }
    386.                } else {
    387.                    $this->initCursedPage();
    388.                    if (isset($this->layout)) {
    389.                        $this->smartyOutputContent($this->layout);
    
    • ControllerCore->run - [line 743 - classes/Dispatcher.php]
    738.                if (isset($paramsHookActionDispatcher)) {
    739.                    Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
    740.                }
    741.    
    742.                // Running controller
    743. =>             $controller->run();
    744.            } catch (PrestaShopException $e) {
    745.                $e->displayMessage();
    746.            }
    747.        }
    748.    
    
    • DispatcherCore->dispatch - [line 33 - index.php]
    28.     *  @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
    29.     *  PrestaShop is an internationally registered trademark & property of PrestaShop SA
    30.     */
    31.    
    32.    require(dirname(__FILE__).'/config/config.inc.php');
    33. => Dispatcher::getInstance()->dispatch();
    


  • Disable the block currency module, it looks like there is an error in it. What version are you using?



  • That was the issue, so thanks a lot!
    It seems to work for now but I need that module.

    It’s version 1.0.0 of the module, with no updates available on tb1.0.3



  • Hmm its actually the warehouse theme template that is the issue. It sounds like it is missing a } somewhere. You might put in a support request with Marcin about it.



  • Unfortunately my support has run out for that theme…



  • You might make a new post with the contents of that file if you cannot work it out. It seems to be line 41 that is the problem.



  • That was it, I reuploaded the module and it seems to work now. Thanks X1000


 

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