Jump to content
thirty bees forum

Recommended Posts

Posted

Tried upgrading again and failed dismally. Downloaded the panda files disabled PayPal

 

Quote
Error

Attempt to modify property "value" on null

when rendering smarty template /home/root/domains/website.co.uk/public_html/themes/panda/./breadcrumb.tpl

Source file: /home/root/domains/website.co.uk/public_html/themes/panda/./breadcrumb.tpl

1:{*
2:* 2007-2014 PrestaShop
3:*
4:* NOTICE OF LICENSE
5:*
6:* This source file is subject to the Academic Free License (AFL 3.0)
7:* that is bundled with this package in the file LICENSE.txt.
8:* It is also available through the world-wide-web at this URL:
9:* http://opensource.org/licenses/afl-3.0.php
10:* If you did not receive a copy of the license and are unable to
11:* obtain it through the world-wide-web, please send an email
12:* to [email protected] so we can send you a copy immediately.
13:*
14:* DISCLAIMER
15:*
16:* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
17:* versions in the future. If you wish to customize PrestaShop for your
18:* needs please refer to http://www.prestashop.com for more information.
19:*
20:*  @author PrestaShop SA <[email protected]>
21:*  @copyright  2007-2014 PrestaShop SA
22:*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
23:*  International Registered Trademark & Property of PrestaShop SA
24:*}
25:
26:{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
27:
28:{if !empty($path)}
29:	{* Extract breadcrumb links from anchors *}
30:	{$matches = []}
31:	{$matchCount = preg_match_all('/<a.+?href="(.+?)"[^>]*>([^<]*)<\/a>/', $path, $matches)}
32:	{$breadcrumbs = []}
33:	{for $i=0; $i<$matchCount; $i++}
34:		{$breadcrumbs[] = ['url' => $matches[1][$i], 'title' => $matches[2][$i]]}
35:	{/for}
36:
37:	{* Extract the last breadcrumb which is not link, it's plain text or text inside span *}
38:	{$match = preg_match("/>([^<]+)(?:(?:<\/\w+>)*\s*)?$/", $path, $matches)}
39:	{if !empty($matches[1])}
40:		{$breadcrumbs[] = ['url' => '', 'title' => $matches[1]]}
41:	{elseif !$match && !$matchCount}
42:		{$breadcrumbs[] = ['url' => '', 'title' => $path]}
43:	{/if}
44:{/if}
45:<section class="breadcrumb">
46:    <ul itemscope itemtype="http://schema.org/BreadcrumbList">
47:	<li  itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}" itemprop="item"><span itemprop="name">{l s='Home'}</span></a><meta itemprop="position" content="1" /></li>
48:	{if !empty($breadcrumbs)}
49:		{foreach from=$breadcrumbs item=breadcrumb name=crumbs}
50:		<li class="navigation-pipe">{$navigationPipe}</li>
51:			<li {if !empty($breadcrumb.url)}itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{/if}>
52:				{if !empty($breadcrumb.url)}
53:					<a href="{$breadcrumb.url}" itemprop="item" title="{$breadcrumb.title}">
54:						<span itemprop="name">{$breadcrumb.title}</span>
55:					</a>
56:					<meta itemprop="position" content="{($smarty.foreach.crumbs.iteration|intval + 1)}" />
57:				{else}
58:					<a href="{if isset($force_ssl) && $force_ssl}https://{else}http://{/if}{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" title="{$breadcrumb.title}" itemprop="item">
59:		            	<span itemprop="name">{$breadcrumb.title}</span>
60:					</a>
61:				{/if}
62:			</li>
63:		{/foreach}
64:	{/if}
65:    </ul>
66:</section>
67:
68:
69:{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
70:<div id="search_return" class="pull-right hidden-xs">
71:	{capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
72:	<a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back" rel="nofollow">
73:		<i class="icon-left-open-3"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
74:	</a>
75:</div>
76:{/if}
Quote
Fatal Error

Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

in file /home/root/domains/website.co.uk/public_html/modules/themeconfigurator/themeconfigurator.php at line 894

Source file: /home/root/domains/website.co.uk/public_html/modules/themeconfigurator/themeconfigurator.php

875:     * @return string
876:     */
877:    protected function renderThemeConfiguratorForm()
878:    {
879:        $idShop = (int) $this->context->shop->id;
880:        $items = [];
881:        $hooks = [];
882:
883:        $this->context->smarty->assign(
884:            'htmlcontent',
885:            [
886:                'admin_tpl_path' => $this->admin_tpl_path,
887:                'hooks_tpl_path' => $this->hooks_tpl_path,
888:
889:                'info' => [
890:                    'module'    => $this->name,
891:                    'name'      => $this->displayName,
892:                    'version'   => $this->version,
893:                    'psVersion' => _PS_VERSION_,
894:                    'context'   => (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') == 0) ? 1 : ($this->context->shop->getTotalShops() != 1) ? $this->context->shop->getContext() : 1,
895:                ],
896:            ]
897:        );
898:
899:        foreach ($this->languages as $language) {
900:            $hooks[$language['id_lang']] = [
901:                'home',
902:                'top',
903:                'left',
904:                'right',

 

Posted

#1 - Did you clear your cache after you uploaded new template? If not, it's possible smarty still used compiled version and ignored your changes, resulting in error.

#2 - this bug was already fixed in themeconfigurator module. Go to your modules page and update this module to latest version. If no new version is available, it's probably because you are using 'prestashop' version -- updater will not offer updates if author is not 'thirty bees'. If this is the case, you can either uninstall, then delete, then refresh modules page and install tb version. Alternatively, you can download themeconfigurator module zip file and upload it manually https://github.com/thirtybees/themeconfigurator/releases/tag/3.0.10

Posted

Thanks... getting these now

It is the Prestashop version of payPal

Quote
Fatal Error

Array and string offset access syntax with curly braces is no longer supported

in file /home/root/domains/website.co.uk/public_html/modules/paypal/paypal.php at line 2729

Source file: /home/root/domains/website.co.uk/public_html/modules/paypal/paypal.php

2710:                // remove ending zeroes from decimals and remove point
2711:                $dec1 = isset($tmp1[2]) ? rtrim(Tools::substr($tmp1[2], 1), '0') : '';
2712:                $dec2 = isset($tmp2[2]) ? rtrim(Tools::substr($tmp2[2], 1), '0') : '';
2713:
2714:                // if the user defined $scale, then make sure we use that only
2715:                if ($scale != null) {
2716:                    $dec1 = Tools::substr($dec1, 0, $scale);
2717:                    $dec2 = Tools::substr($dec2, 0, $scale);
2718:                }
2719:
2720:                // calculate the longest length of decimals
2721:                $d_len = max(Tools::strlen($dec1), Tools::strlen($dec2));
2722:
2723:                // append the padded decimals onto the end of the whole numbers
2724:                $num1 .= str_pad($dec1, $d_len, '0');
2725:                $num2 .= str_pad($dec2, $d_len, '0');
2726:
2727:                // check digit-by-digit, if they have a difference, return 1 or -1 (greater/lower than)
2728:                for ($i = 0; $i < Tools::strlen($num1); $i++) {
2729:                    if ((int) $num1{$i} > (int) $num2{$i}) {
2730:                        return 1;
2731:                    } elseif ((int) $num1{$i} < (int) $num2{$i}) {
2732:                        return -1;
2733:                    }
2734:                }
2735:                // if the two numbers have no difference (they're the same).. return 0
2736:                return 0;
2737:            }
2738:        }
2739:    }

 

Posted

This module uses syntax that is no longer supported. In this particular case, the line should look like this:

if ((int) $num1[$i] > (int) $num2[$i]) {

Similar change needs to be done on line 2731.

The question is how many more issues like this will be in third party modules.

It's not really safe to switch to PHP8 without preparation steps.

I suggest you follow these steps to make your store php8 ready:

  1. switch to PHP7.4
  2. disable cache in Advanced Parameters > Performance, so compile-time errors are detected
  3. install collectlogs module - it will create new menu item Advanced Parameters > Error Logs
  4. watch for every Warnings and Deprecation types of errors this module collects. Most warnings / deprecations in php7.4 are upgraded to errors in php8
  5. proactively click on every front and back office page so you detect as many warnings as possible
  6. Once you fix these warnings/deprecation (no new recent occurences) you can safely switch to PHP8

when you switch to PHP8, don't forget to go to Core Updater and update your store again -- this time for code specifically build for PHP8. Once you do this, you can't switch php back to 7.4, though -- you would first need to use core updater to downgrade your code for lower PHP first

 

  • Thanks 1
Posted
Quote
Fatal Error

require(): Failed opening required '/home/root/domains/website.co.uk/public_html/modules/stmegamenu/StMegaMenuClass.php' (include_path='/root/domains/website.co.uk/public_html/vendor/pear/archive_tar:/root/domains/website.co.uk/public_html/vendor/pear/console_getopt:/home/root/domains/website.co.uk/public_html/vendor/pear/pear-core-minimal/src:/home/root/domains/website.co.uk/public_html/vendor/pear/pear_exception:.:/opt/alt/php74/usr/share/pear')

in file /home/root/domains/website.co.uk/public_html/modules/stmegamenu/stmegamenu.php at line 29

Source file: /home/root/domains/website.co.uk/public_html/modules/stmegamenu/stmegamenu.php

10:* http://opensource.org/licenses/afl-3.0.php
11:* If you did not receive a copy of the license and are unable to
12:* obtain it through the world-wide-web, please send an email
13:* to [email protected] so we can send you a copy immediately.
14:*
15:* DISCLAIMER
16:*
17:* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
18:* versions in the future. If you wish to customize PrestaShop for your
19:* needs please refer to http://www.prestashop.com for more information.
20:*
21:*  @author PrestaShop SA <[email protected]>
22:*  @copyright  2007-2014 PrestaShop SA
23:*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
24:*  International Registered Trademark & Property of PrestaShop SA
25:*/
26:if (!defined('_PS_VERSION_'))
27:	exit;
28:    
29:require (dirname(__FILE__).'/StMegaMenuClass.php');
30:require (dirname(__FILE__).'/StMegaColumnClass.php');
31:require (dirname(__FILE__).'/StMegaProductClass.php');
32:require (dirname(__FILE__).'/StMegaBrandClass.php');
33:
34:class StMegaMenu extends Module
35:{
36:    protected static $cache_stmegamenu;
37:    protected static $access_rights = 0775;
38:	private $_html = '';
39:    public $fields_list;

 

Posted

You used stmegamenu.php file modified by @musicmaster. However, he modified different version than you used before. You can't really mix and match (modified) files from different versions of the same module.

Posted
1 minute ago, datakick said:

You used stmegamenu.php file modified by @musicmaster. However, he modified different version than you used before. You can't really mix and match (modified) files from different versions of the same module.

OK I see

 

Posted

Just about given up, just can't get it to work.. May have another go tomorrow but just made a sale so can't do restores till tomorrows website backup 

Posted

If things are more stable under PHP 8.0, try working there to fix the problems before going to 8.1. When you can fix problems by just looking in the error log your webshop can keep running. 

Posted
1 hour ago, musicmaster said:

If things are more stable under PHP 8.0, try working there to fix the problems before going to 8.1. When you can fix problems by just looking in the error log your webshop can keep running. 

Yeah been using 8.0 most

Just tried again and it's always breadcrumb.tpl

Quote
Error

Attempt to modify property "value" on null

when rendering smarty template /home/name/domains/website.co.uk/public_html/themes/panda/./breadcrumb.tpl

Source file: /home/root/domains/website.co.uk/public_html/themes/panda/./breadcrumb.tpl

1:{*
2:* 2007-2014 PrestaShop
3:*
4:* NOTICE OF LICENSE
5:*
6:* This source file is subject to the Academic Free License (AFL 3.0)
7:* that is bundled with this package in the file LICENSE.txt.
8:* It is also available through the world-wide-web at this URL:
9:* http://opensource.org/licenses/afl-3.0.php
10:* If you did not receive a copy of the license and are unable to
11:* obtain it through the world-wide-web, please send an email
12:* to [email protected] so we can send you a copy immediately.
13:*
14:* DISCLAIMER
15:*
16:* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
17:* versions in the future. If you wish to customize PrestaShop for your
18:* needs please refer to http://www.prestashop.com for more information.
19:*
20:*  @author PrestaShop SA <[email protected]>
21:*  @copyright  2007-2014 PrestaShop SA
22:*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
23:*  International Registered Trademark & Property of PrestaShop SA
24:*}
25:
26:{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
27:
28:{if !empty($path)}
29:	{* Extract bradcrumb links from anchors *}
30:
31:	{$matchCount = preg_match_all('/<a.+?href="(.+?)"[^>]*>([^<]*)<\/a>/', $path, $matches)}
32:	{$breadcrumbs = []}
33:	{for $i=0; $i<$matchCount; $i++}
34:		{$breadcrumbs[] = ['url' => $matches[1][$i], 'title' => $matches[2][$i]]}
35:	{/for}
36:
37:	{* Extract the last breadcrumb which is not link, it's plain text or text inside span *}
38:	{$match = preg_match("/>([^<]+)(?:(?:<\/\w+>)*\s*)?$/", $path, $matches)}
39:	{if !empty($matches[1])}
40:		{$breadcrumbs[] = ['url' => '', 'title' => $matches[1]]}
41:	{elseif !$match && !$matchCount}
42:		{$breadcrumbs[] = ['url' => '', 'title' => $path]}
43:	{/if}
44:{/if}
45:<section class="breadcrumb">
46:    <ul itemscope itemtype="http://schema.org/BreadcrumbList">
47:	<li  itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}" itemprop="item"><span itemprop="name">{l s='Home'}</span></a><meta itemprop="position" content="1" /></li>
48:	{if !empty($breadcrumbs)}
49:		{foreach from=$breadcrumbs item=breadcrumb name=crumbs}
50:		<li class="navigation-pipe">{$navigationPipe}</li>
51:			<li {if !empty($breadcrumb.url)}itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{/if}>
52:				{if !empty($breadcrumb.url)}
53:					<a href="{$breadcrumb.url}" itemprop="item" title="{$breadcrumb.title}">
54:						<span itemprop="name">{$breadcrumb.title}</span>
55:					</a>
56:					<meta itemprop="position" content="{($smarty.foreach.crumbs.iteration|intval + 1)}" />
57:				{else}
58:					<a href="{if isset($force_ssl) && $force_ssl}https://{else}http://{/if}{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" title="{$breadcrumb.title}" itemprop="item">
59:		            	<span itemprop="name">{$breadcrumb.title}</span>
60:					</a>
61:				{/if}
62:			</li>
63:		{/foreach}
64:	{/if}
65:    </ul>
66:</section>
67:
68:
69:{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
70:<div id="search_return" class="pull-right hidden-xs">
71:	{capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
72:	<a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back" rel="nofollow">
73:		<i class="icon-left-open-3"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
74:	</a>
75:</div>
76:{/if}

This is what my breadcrumb file looks like... I can only bet it is a small change required

Quote

{*
* 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 [email protected] 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 <[email protected]>
*  @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}
<section class="breadcrumb">
    <ul itemscope itemtype="http://schema.org/BreadcrumbList">
    <li  itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}" itemprop="item"><span itemprop="name">{l s='Home'}</span></a><meta itemprop="position" content="1" /></li>
    {if !empty($breadcrumbs)}
        {foreach from=$breadcrumbs item=breadcrumb name=crumbs}
        <li class="navigation-pipe">{$navigationPipe}</li>
            <li {if !empty($breadcrumb.url)}itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{/if}>
                {if !empty($breadcrumb.url)}
                    <a href="{$breadcrumb.url}" itemprop="item" title="{$breadcrumb.title}">
                        <span itemprop="name">{$breadcrumb.title}</span>
                    </a>
                    <meta itemprop="position" content="{($smarty.foreach.crumbs.iteration|intval + 1)}" />
                {else}
                    <a href="{if isset($force_ssl) && $force_ssl}https://{else}http://{/if}{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" title="{$breadcrumb.title}" itemprop="item">
                        <span itemprop="name">{$breadcrumb.title}</span>
                    </a>
                {/if}
            </li>
        {/foreach}
    {/if}
    </ul>
</section>


{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div id="search_return" class="pull-right hidden-xs">
    {capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
    <a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back" rel="nofollow">
        <i class="icon-left-open-3"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
    </a>
</div>
{/if}

 

Posted
23 minutes ago, musicmaster said:

That is the issue I mentioned here

add {$matches=[]} on line 30

OK , you are right , all working now... I was using your uploaded files grrrrr lol, once I edited it worked almost right away... Only have 1 issue now which is PayPal

I couldn't delete it as Modules list page was white (ie nothing there) .... I changed name in ftp to get access , but it's now gone ..... Don't know if that hurts my site or not .. Just trying the TB version

Posted

TB version is working, but prefer the pop payment but like the prestashop 1 had. So basically you not leaving the site to pay... Well in reality you are you site is still in the back ground  

Posted (edited)

I may have found a small error with the basket.. If you try and remove a item it just says unable to delete. But when you refresh error item has gone .

Screenshot 2022-11-27 175940.png

Edited by AndyC
Posted
1 hour ago, AndyC said:

I may have found a small error with the basket.. If you try and remove a item it just says unable to delete. But when you refresh error item has gone .

Screenshot 2022-11-27 175940.png

Did you look in the server's error log?

Posted (edited)

Nothing that I could see.. There is a mega menu issue , but have disabled for now as don't really use it 

Quote
rmdir(/home/root/domains/website.co.uk/public_html/cache/smarty/cache/stmegamenu/1/1/1/17/dd/58/7f): Directory not empty vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_cacheresourcefile.php:76
     

 

Edited by AndyC
Posted

Thanks for helping Musicmaster, I appreciate your time... I  tried a restore but I see that doesn't help ( Yes I saw the message saying this ).. I have no idea how to go back to the older version ..So I am now in dire straights... Can't go back and got a half working site with errors... and have lost orders to boot... Datakick do you have you got time to look please , as will have to pay if need be now. 

 

Posted

Thank Goodness... I've worked out how to return my website back to a working state... I'll have to work out what went wrong, as so much wasn't working.. Maybe copy it to a mirror database 

Posted

Hi @AndyC

I'm glad you managed to restore your store to working state. If you still need our help, you can purchase support time on store.thirtybees.com

At the moment, I suggest you run your store on PHP7.4. Please read my previous post: 

 

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...