News:

Looking for documentation? Take a look on our wiki

Main Menu

Unsupported operand types: string * int

Started by lostmail, February 11, 2023, 15:29:49 PM

Previous topic - Next topic

lostmail

HI there,
I set in my htaccess from AddHandler php74-cgi .php to AddHandler php81-cgi .php

Now I have the problem, that i get this message when i click categories/sub categories:

"0 Unsupported operand types: string + int"

I have an older backup as test environment which i updated with to current joomla and vm but here the error message is not coming up...same server/webspace.

Any idea what is crashing the category navigation ?

Another strange thing is that in category navigation some links open the subcategories and some links don`t open them (but they have su-categories) - than only the category overvie in main page is visible but not in the category navigation tree.
But clicking a sub category in main page the same error message comes up
"0 Unsupported operand types: string + int"

Changin back to PHP7.4 the problem does not exist (beside the trouble with the not showing sub-menus in category try at some main categories..some slide out the sub categories - some not)....

Thank you.
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

AH

Regards
A

Joomla 3.10.11
php 8.0

lostmail

Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

GJC Web Design

you need to provide an error trace ... no one can just "guess" where this error comes from..

Could just as easily be from a 3rd party ext or template
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

lostmail

Like this one ?


QuoteUnsupported operand types: string * int

Call stack
#    Function    Location
1    ()    JROOT/templates/horme_3_pro/html/com_virtuemart/sublayouts/badges.php:9
2    include()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:567
3    shopFunctionsF::renderVmSubLayout()    JROOT/templates/horme_3_pro/html/com_virtuemart/sublayouts/products.php:129
4    include()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:567
5    shopFunctionsF::renderVmSubLayout()    JROOT/templates/horme_3_pro/html/com_virtuemart/category/default.php:210
6    include()    JROOT/libraries/src/MVC/View/HtmlView.php:701
7    Joomla\CMS\MVC\View\HtmlView->loadTemplate()    JROOT/components/com_virtuemart/helpers/vmview.php:81
8    VmView->display()    JROOT/components/com_virtuemart/views/category/view.html.php:534
9    VirtuemartViewCategory->display()    JROOT/components/com_virtuemart/controllers/category.php:61
10    VirtueMartControllerCategory->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:702
11    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/components/com_virtuemart/virtuemart.php:128
12    require_once()    JROOT/libraries/src/Component/ComponentHelper.php:402
13    Joomla\CMS\Component\ComponentHelper::executeComponent()    JROOT/libraries/src/Component/ComponentHelper.php:377
14    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/SiteApplication.php:194
15    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:233
16    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:225
17    Joomla\CMS\Application\CMSApplication->execute()    JROOT/index.php:49
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

lostmail

Switched shop/configuration/templates to category template vmbeez3 - Standard and now I receive some more information:

Quote#0 Unsupported operand types: string * int

/www/htdocs/w014c4cc/bts-autoteile.de/_TEST/templates/horme_3_pro/html/com_virtuemart/sublayouts/badges.php:9
Call stack
#    Function    Location
1    ()    JROOT/templates/horme_3_pro/html/com_virtuemart/sublayouts/badges.php:9
2    include()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:567
3    shopFunctionsF::renderVmSubLayout()    JROOT/templates/horme_3_pro/html/com_virtuemart/sublayouts/products.php:129
4    include()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:567
5    shopFunctionsF::renderVmSubLayout()    JROOT/templates/horme_3_pro/html/com_virtuemart/category/default.php:210
6    include()    JROOT/libraries/src/MVC/View/HtmlView.php:701
7    Joomla\CMS\MVC\View\HtmlView->loadTemplate()    JROOT/components/com_virtuemart/helpers/vmview.php:81
8    VmView->display()    JROOT/components/com_virtuemart/views/category/view.html.php:534
9    VirtuemartViewCategory->display()    JROOT/components/com_virtuemart/controllers/category.php:61
10    VirtueMartControllerCategory->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:702
11    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/components/com_virtuemart/virtuemart.php:128
12    require_once()    JROOT/libraries/src/Component/ComponentHelper.php:402
13    Joomla\CMS\Component\ComponentHelper::executeComponent()    JROOT/libraries/src/Component/ComponentHelper.php:377
14    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/SiteApplication.php:194
15    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:233
16    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:225
17    Joomla\CMS\Application\CMSApplication->execute()    JROOT/index.php:49

In line 9 I found:
$ndate = strtotime ('now') - ($days * 86400); ?>

Is that a problem in php 8.0 ?
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

lostmail

#6
Commented out this line for testing in /templates/horme_3_pro/html/com_virtuemart/sublayouts/badges.php:9 :

//$ndate = strtotime ('now') - ($days * 86400); ?>

Now the site works....categories and products are now loading.

What does PHP8 have a problem with this line ?
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

lostmail

PERFECT SOLUTION.

Works  now as it should.

Thank you !

Did not find that thread in my forum searches...
Joomla 3.x | VirtueMart 4.0.12 107771 | HORME3 PRO 1.9.6 / 2.0
VirtueMart 4.2.4 | Joomla 4.4.1 | PHP 8.1 | Vp_neoteric 1.3