Author Topic: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"  (Read 2569 times)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10744
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #15 on: January 28, 2023, 14:54:24 pm »
This is not an error trace ... this is error reporting which is breaking your session header etc

https://forum.virtuemart.net/index.php?topic=117042.msg470068#msg470068

or try again with reporting set to default and the debug plugin enabled but all options set to off if u run out of memory
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

subn3t

  • Beginner
  • *
  • Posts: 7
  • Fan
  • VirtueMart Version: 4.0.6 10690
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #16 on: January 28, 2023, 20:39:48 pm »
Yes! I know what a backtrace is and how to find the problem in logs. It was just not showing. :)

I finally found out what was the problem. After upgrading to Joomla 4 I managed to switch on the error reporting and get the trace. It was a third party payment module that had the problem and when I fixed it wit adding (float) before the string in the problematic line everything worked perfectly.

I am now sending the problem to the guys that wrote the plugin so they can apply it.

Thank you very much for the time you spent with my problem.

Kind Regards,
Stefan

pico71

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #17 on: February 06, 2023, 12:11:43 pm »
Hi Have problem with BACKEND ov VIRTUEMART when use PHP 8.1
Using PHP 8.1 - Give me error when I try to edit a product from backend.
Are we sure that VM VirtueMart 4.0.12 10777 (I have this versione) is fully compatible with PHP 8.1 ?
My JOOMLA Versione is: 3.10.11
THX

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28541
  • Always on vacation
    • Jenkin Hill Internet
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #18 on: February 06, 2023, 13:15:41 pm »
What is the error?

Joomla 3.10.11 is not compatible with PHP 8.1, unless the level of error reporting in the Server tab of the Global Configuration is set to 'Simple' or 'None'. The recommended version of PHP for Joomla 3.10.11 is PHP 8.0, as you can see from the Technical Requirements for Joomla 3.x.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 4.0.14 10805  J 3.10.11 PHP 8.0.27

pico71

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #19 on: February 06, 2023, 19:16:48 pm »
I have Error Level set to NONE but PHP 8.0 do nork at all (Nor frontend nor backend)
BUT PHP 8.1 works quite well in the frontend ... but have issues in the backend (virtuemart backend - Product edit)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10744
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #20 on: February 06, 2023, 22:10:22 pm »
Far more likely your template isn't compatible .. try with Beez etc
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

goooogy2000

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #21 on: February 07, 2023, 09:38:03 am »
I put the build (clean stable versions) of Joomla 4.2.7 + Virtuemart 4.0.12 on the XAMPP server with php 7.4 - editing the product card and category card works fine. If I put the same assembly on XAMPP with php 8.0 or php8.1, then there is no way to edit the product card or category card. What could be, where to look?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10744
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #22 on: February 07, 2023, 09:55:18 am »
provide a FULL report of what is happening, what the error is etc etc

I have multiple installs on Joomla 4.2.7 + Virtuemart 4.0.12 + php8 working fine ( apart from the https://forum.virtuemart.net/index.php?topic=149553.msg534030#msg534030 problem fixed in 4.0.13)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

goooogy2000

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #23 on: February 07, 2023, 10:14:27 am »
I tried to attach a screenshot, but the system does not skip such an answer

goooogy2000

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #24 on: February 07, 2023, 10:19:23 am »
I'm trying to attach a screenshot

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10744
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #25 on: February 07, 2023, 10:24:40 am »
apart from the fact it looks like you have css not loading (check the console - have u fully cleared all caches ?  ) you also have these 3 things to correct.

The only error I assume is because u can't create thumbnails .. ( no GD library? )

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

goooogy2000

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #26 on: February 07, 2023, 10:33:34 am »
the problem was solved by uncomenting the extension=gd string in php.ini

T.A. Garrison, LLC

  • Jr. Member
  • **
  • Posts: 70
  • Thomas Garrison
    • T.A. Garrison, LLC
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #27 on: February 21, 2023, 21:50:44 pm »
Ok. I've read through the thread and don't find a resolve.

I "had" VM 4 installed with J4.2.8 yesterday and then had to reinstall everything. I "dropped" everything in the database and started over (it's a dummy site and nothing other than VM, Istraxx Quantity Discount, and JCE have been installed - using Cassiopeia). I also have Php 8.0 enabled.
Upon reinstall with VM 4.0.12 10777 and J 4.2.8 I created a product yesterday. It worked. Not today.

Today, I created a second product (a lot of testing required for this project). I also created "Custom Fields" - 2. One if for "Group" and a second for "Year".
Everything was working fine until I clicked on "Product Details" (either product has the same results), and got an error from Joomla:

The requested page can't be found.

An error has occurred while processing your request.

You may not be able to visit this page because of:

    an out-of-date bookmark/favourite
    a mistyped address
    a search engine that has an out-of-date listing for this site
    you have no access to this page

Go to the Home Page

If difficulties persist, please contact the website administrator and report the error below.

    0 Unsupported operand types: float * string



I've unpublished the Custom Fields and tried again. Same results.
I deleted the Custom Fields from both products and tried again. Same results.

Then I unpublished the plugin I installed after reinstalling everything else.
It turned out that the Quantity Discount plugin for which my client paid is causing the problem.

Because this is something for another thread I'll move over there now that I know what's causing the issue. But the Istraxx 1.10.0 is at fault and also has an error when debugging - Deprecated: Required parameter $plus follows optional parameter $currency in /home/schoolfo/store.schoolfortheblonde.com/plugins/vmcalculation/istraxx_quantity/istraxx_quantity.php on line 546

My problem throws the error that is discussed in this thread. I thought it would help others, but I began posting here before I ran down the culprit.


By the way. The "gross price" in the latest VM? I don't understand the value of having that "mandated" in every site that uses VM 4. Why isn't that an option? I'll hide that via CSS, but still....
Things like that "may" be helpful, IF one could arrange the order in which things like that appear. But where it appears is wrong. Too many "? - price" and it's becoming confusing for customers.
T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1665
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #28 on: February 21, 2023, 23:31:54 pm »
You don't need plugin, we have quantity range table in product detail too - is only 10 lines code in php, you can write self without error :)

I don't understand, every want plugin plugin plugin, but don't want do it self...
I don't developper, but this table created self, every info you have in object product price :)
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

T.A. Garrison, LLC

  • Jr. Member
  • **
  • Posts: 70
  • Thomas Garrison
    • T.A. Garrison, LLC
Re: Product edit in admin - PHP v8.0 "Unsupported operand types: string + int"
« Reply #29 on: February 21, 2023, 23:40:30 pm »
If I had somewhere that I could get "updated" information with proper coding instructions, I would prefer to not use the plugin!
I've only been able to find "outdated" instructions.

I've been unable to find code / instructions on how to create the quantity steps. I searched for days before finally purchasing the plugin.
Are you saying that plugin is not going to work?
I have no problem uninstalling the plugin. But I would need to "updated" instructions for VM 4 and J 4 in order to not use the plugin.
T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228