Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"

Started by xur82, July 20, 2022, 15:35:23 PM

Previous topic - Next topic

xur82

Virtuemart 4.0.6
Joomla 4.15

Working fine with php 7.4, but if I switch to php v 8.0 I have an error when trying to edit a product in Virtuemart Admin..
Unsupported operand types: string + int
and the product details will not display.

Any help would be appreciated, thanks

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

xur82

I have a choice on my hosting account 8.0 (which is what I am trying) and 8.1
cheers

xur82

My original post should have said php 8.0
Since your reply I just tried 8.1 and have the same error/problem with that php version too

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Jac62

Same problem with Joomla 3.10.10 and PHP 8.0.
Error in front end: Unsupported operand types: string % string

It works fine with PHP 7.4
Does anyone have a clue ?
Thanks

Jac62

VM 4.0.6
Same problem with Joomla 3.10.10 and PHP 8.0.
Error in front end: Unsupported operand types: string % string

It works fine with PHP 7.4
Does anyone have a clue ?
Thanks

GJC Web Design

supply the bug trace with debugging so we know where it is happening...
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

Jac62

Hi,

in php 8, with the debug mode, the page remains blank.
Here is the code from the previous page that calls the product categories. Thanks.

{
    "__default": {
        "session": {
            "counter": 42,
            "timer": {
                "start": 1659594535,
                "last": 1659688896,
                "now": 1659688900
            },
            "token": "s3VZZJHjSFZhQrTj5QmVHFxOfhZa7i7d"
        },
        "registry": {
            "com_virtuemart": {
                "category": {
                    "limit": ""
                },
                "categoryc13m0": {
                    "limitstart": 0
                },
                "categoryc23m0": {
                    "limitstart": 0
                },
                "categoryc15m0": {
                    "limitstart": 0
                }
            }
        },
        "user": {
            "id": 0,
            "name": null,
            "username": null,
            "email": null,
            "password": null,
            "password_clear": "",
            "block": null,
            "sendEmail": 0,
            "registerDate": null,
            "lastvisitDate": null,
            "activation": null,
            "params": null,
            "groups": [],
            "guest": 1,
            "lastResetTime": null,
            "resetCount": null,
            "requireReset": null,
            "aid": 0
        },
        "plg_system_languagefilter": {
            "language": "fr-FR"
        }
    },
    "__vm": {
        "manage": 0,
        "vmlastvisitedItemid": 123,
        "vmlastvisitedcategoryid": 0,
        "vmlastvisitedmanuid": 0,
        "vmcartlastVendorId": 1
    }
}

Studio 42

If you have a blank page, activate the debug log file in PHP. So you have the informations
But blank page should show the php debug trace if you have set it correctly

e-trader

VirtueMart 4.0.6 10690
php 8.0
joomla 3.10.11


Error: 0 Unsupported operand types: string + int

Call stack
#   Function   Location
1   ()   JROOT/administrator/components/com_virtuemart/helpers/mediahandler.php:1314
2   VmMediaHandler->displayFileHandler()   JROOT/administrator/components/com_virtuemart/helpers/mediahandler.php:1106
3   VmMediaHandler->displayFilesHandler()   JROOT/components/com_virtuemart/views/user/tmpl/edit_vendor.php:116
4   include()   JROOT/libraries/src/MVC/View/HtmlView.php:701
5   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:1067
6   shopFunctionsF::buildTabs()   JROOT/components/com_virtuemart/views/user/tmpl/edit.php:73
7   include()   JROOT/libraries/src/MVC/View/HtmlView.php:701
8   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/components/com_virtuemart/helpers/vmview.php:69
9   VmView->display()   JROOT/components/com_virtuemart/views/user/view.html.php:245
10   VirtuemartViewUser->display()   JROOT/components/com_virtuemart/controllers/user.php:59
11   VirtueMartControllerUser->display()   JROOT/libraries/src/MVC/Controller/BaseController.php:702
12   Joomla\CMS\MVC\Controller\BaseController->execute()   JROOT/components/com_virtuemart/virtuemart.php:114
13   require_once()   JROOT/libraries/src/Component/ComponentHelper.php:402
14   Joomla\CMS\Component\ComponentHelper::executeComponent()   JROOT/libraries/src/Component/ComponentHelper.php:377
15   Joomla\CMS\Component\ComponentHelper::renderComponent()   JROOT/libraries/src/Application/SiteApplication.php:194
16   Joomla\CMS\Application\SiteApplication->dispatch()   JROOT/libraries/src/Application/SiteApplication.php:233
17   Joomla\CMS\Application\SiteApplication->doExecute()   JROOT/libraries/src/Application/CMSApplication.php:225
18   Joomla\CMS\Application\CMSApplication->execute()   JROOT/index.php:49

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

subn3t

When viewing cart in front end we get "Unsupported operand types: string * float". Works with PHP 7.4. With PHP8 we get the error. Any ideas?

Joomla  3.10.11
Virtuemart 4.0.12 10777
PHP 8.1.14
MySQLi 5.7.35

jenkinhill

Maybe coming from your template. Try Protostar?

Providing an error trace would show the source of the error. In Joomla Global Configuration set "Error Reporting" as "Maximum" and enable the "Debugging" option. In VirtueMart Configuration and set PHP Development mode for "all".
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

subn3t

Thank you for the reply.

We tried with the Protostar - same error.

Switched the error reporting to Maximum and now both front end and back end are broken . The page only says:

-----------------QUOTE------------

Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/username/public_html/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/username/public_html/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/username/public_html/libraries/src/Input/Input.php on line 31

Warning: session_name(): Session name cannot be changed after headers have already been sent in /home/username/public_html/libraries/joomla/session/handler/native.php on line 128

Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/username/public_html/libraries/src/Input/Cookie.php on line 0

Warning: session_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /home/username/public_html/libraries/joomla/session/handler/native.php on line 235
Error: Failed to start application: Failed to start the session because headers have already been sent by "/home/username/public_html/libraries/vendor/joomla/input/src/Input.php" at line 41.

-----------END OF QUOTE ---------

Everything worked with PHP7.4.
Any help will be greatly appreciated.