VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Kuubs on November 09, 2022, 14:28:41 PM

Title: Required parameter $htmlIn follows optional parameter $selected
Post by: Kuubs on November 09, 2022, 14:28:41 PM
Hello,

After updating to PHP8 I get the following message:

Required parameter $htmlIn follows optional parameter $selected

This is because of the following line of code:

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.
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: StefanSTS 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
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: Kuubs on November 10, 2022, 17:16:56 PM
Quote from: StefanSTS 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

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.
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: Milbo on November 10, 2022, 19:53:42 PM
This is a plugin. Just change the line to

public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: Kuubs on November 11, 2022, 11:28:18 AM
Quote from: Milbo on November 10, 2022, 19:53:42 PM
This is a plugin. Just change the line to

public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {


Ok thank you!
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: Kuubs on November 11, 2022, 16:06:23 PM
Quote from: Milbo on November 10, 2022, 19:53:42 PM
This is a plugin. Just change the line to

public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {


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

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.
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: pinochico on November 11, 2022, 18:53:08 PM
It sounds like mix

shipment and payment :D

send all debug info
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: StefanSTS on November 14, 2022, 13:35:37 PM
Quote from: Kuubs on November 10, 2022, 17:16:56 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
Title: Re: Required parameter $htmlIn follows optional parameter $selected
Post by: Kuubs on November 14, 2022, 18:39:53 PM
Quote from: StefanSTS on November 14, 2022, 13:35:37 PM
Quote from: Kuubs on November 10, 2022, 17:16:56 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