Author Topic: Required parameter $htmlIn follows optional parameter $selected  (Read 377 times)

Kuubs

  • Jr. Member
  • **
  • Posts: 376
Required parameter $htmlIn follows optional parameter $selected
« on: November 09, 2022, 14:28:41 pm »
Hello,

After updating to PHP8 I get the following message:

Code: [Select]
Required parameter $htmlIn follows optional parameter $selected
This is because of the following line of code:

Code: [Select]
public function displayListFE (VirtueMartCart $cart, $selected = 0, &$htmlIn) {
This seems like a core function that gets overridden. Does the core needs to be adjusted to fix this?


This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 584
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #1 on: November 10, 2022, 16:16:42 pm »
Update VirtueMart or maybe third party payment plugins.

Please get used to specifying proper version numbers.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Kuubs

  • Jr. Member
  • **
  • Posts: 376
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #2 on: November 10, 2022, 17:16:56 pm »
Update VirtueMart or maybe third party payment plugins.

Please get used to specifying proper version numbers.

Stefan

Yeah I'm sorry I should've specified version numbers. I'm already on the newest VM version:

This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

I updated the OP.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10495
  • VM4.0.7 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #3 on: November 10, 2022, 19:53:42 pm »
This is a plugin. Just change the line to
Code: [Select]
public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Kuubs

  • Jr. Member
  • **
  • Posts: 376
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #4 on: November 11, 2022, 11:28:18 am »
This is a plugin. Just change the line to
Code: [Select]
public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {

Ok thank you!

Kuubs

  • Jr. Member
  • **
  • Posts: 376
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #5 on: November 11, 2022, 16:06:23 pm »
This is a plugin. Just change the line to
Code: [Select]
public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {

Unfortunately this doesn't work because it overrides a core function:

Code: [Select]
public function plgVmDisplayListFEPayment( VirtueMartCart $cart, $selected = 0, &$htmlIn ) {
return $this->displayListFE( $cart, $selected, $htmlIn );
}

So this is probably something that needs to be updated in the core code. I'm not comfortable in changing the core code.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1604
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #6 on: November 11, 2022, 18:53:08 pm »
It sounds like mix

shipment and payment :D

send all debug info
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

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 584
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #7 on: November 14, 2022, 13:35:37 pm »
I'm already on the newest VM version:
This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

Try to avoid the term "newest version" it's not a version number and different people see different things using this term.

There is a revision number attached to each version. 4.0.7.10734 is a proper version number.

If you use those in future you will get better and faster answers.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Kuubs

  • Jr. Member
  • **
  • Posts: 376
Re: Required parameter $htmlIn follows optional parameter $selected
« Reply #8 on: November 14, 2022, 18:39:53 pm »
I'm already on the newest VM version:
This is on the newest version virtuemart: 4.0.7 and Joomla 3.10.11 in combination with the aforementioned PHP8.

Try to avoid the term "newest version" it's not a version number and different people see different things using this term.

There is a revision number attached to each version. 4.0.7.10734 is a proper version number.

If you use those in future you will get better and faster answers.

Regards
Stefan

Yeah im running on that version will do that i the future