Jump to content
thirty bees forum
  • 1

Error when opening any page TB 1.0.8 and Panda theme


piet

Question

Need some help here please. When I try to open any page except the home page TB gives a 500 error.

Debug mode on gives following info:

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/avionixstore/publichtml/vendor/smarty/smarty/libs/sysplugins/smartyinternal_compilebase.php on line 75

Warning: count(): Parameter must be an array or an object that implements Countable in /home/avionixstore/publichtml/modules/blockcartmod/blockcart_mod.php on line 264

Warning: count(): Parameter must be an array or an object that implements Countable in /home/avionixstore/publichtml/modules/blockcartmod/blockcartmod.php on line 264 [ThirtyBeesException] Syntax error in template "/home/avionixstore/publichtml/themes/panda/breadcrumb.tpl" on line 50 "

" unclosed {foreach} tag at line 50 in file vendor/smarty/smarty/libs/sysplugins/smartyinternaltemplatecompilerbase.php 45. */ 46. public static $_tag_objects = array(); 47. 48. /** 49. * tag stack 50. * 51. * @var array 52. */ 53. public $_tag_stack = array(); 54. 55. /** Smarty_Internal_TemplateCompilerBase->trigger_template_error - [line 165 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_compilebase.php] - [1 Arguments] Smarty_Internal_CompileBase->closeTag - [line 202 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_if.php] - [2 Arguments]

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

@lesley

Below you will find the code

{* * 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 contact@prestashop.com * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *}

{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}

{if !empty($path)} {* Extract bradcrumb links from anchors } {$matchCount = preg_match_all('/<a.+?href="(.+?)"[^>]>([^<]*)<\/a>/', $path, $matches)} {$breadcrumbs = []} {for $i=0; $i<$matchCount; $i++} {$breadcrumbs[] = ['url' => $matches[1][$i], 'title' => $matches[2][$i]]} {/for}

{* Extract the last breadcrumb which is not link, it's plain text or text inside span *}
{$match = preg_match("/>([^<]+)(?:(?:<\/\w+>)*\s*)?$/", $path, $matches)}
{if !empty($matches[1])}
    {$breadcrumbs[] = ['url' => '', 'title' => $matches[1]]}
{elseif !$match && !$matchCount}
    {$breadcrumbs[] = ['url' => '', 'title' => $path]}
{/if}

{/if}

Link to comment
Share on other sites

  • 0

Part 2

{if isset($smarty.get.searchquery) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTPREFERER)}

{/if}

Link to comment
Share on other sites

  • 0

@piet I've fixed the problem of breadcrumb in the latest version of panda theme 1.4.5 which was released about 20 days ago, so upgrade your theme. About the warning the blockcartmod.php, it won't cause any damages to your site, so don't worry about it. I will improve the blockcartmod module for a little bit to avoid having it in next theme update. I guess the warning is probably caused by a 3rd party module you've installed.

Link to comment
Share on other sites

  • 0

Thank for the information, then I was wrong. Both TB's cart module and panda's cart module use a global variable "$error" which is suppose to be an array, but it get overridden somewhere. I thought it was a 3rd party module overriding the global variable to be an non-array variable.

Link to comment
Share on other sites

  • 0

This smarty variable overriding is very unfortunate.

While it would be quite easy to prevent this in the core, it could mean compatibility issue (although in most cases it would actually fix the module interoperability problems). But we could, at least, detect and report this behaviour.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...