- Posts: 303
- Thank you received: 18
Checkout Related Plugin - 500 error after upgrade to J4
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
3 years 5 months ago #351198
by mojooutdoors-holden
-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4.3.0
-- PHP version -- : 8.1
After upgrading to from J3 -> J4, I noticed many php errors when trying to access the HikaShop configuration. I was able to isolate it to just the checkout related plugin.
Please let me know if you need any additional information or backend credentials.
-- Joomla version -- : 4.3.0
-- PHP version -- : 8.1
After upgrading to from J3 -> J4, I noticed many php errors when trying to access the HikaShop configuration. I was able to isolate it to just the checkout related plugin.
Code:
select::optgroup not found.
Please let me know if you need any additional information or backend credentials.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351208
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Checkout Related Plugin - 500 error after upgrade to J4
Hello,
Please re-download the plugin in order to have the fix.
We fixed that issue several months ago but it looks like we had an issue with the upload of the latest version.
Regards,
Please re-download the plugin in order to have the fix.
We fixed that issue several months ago but it looks like we had an issue with the upload of the latest version.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
- Posts: 303
- Thank you received: 18
3 years 5 months ago #351213
by mojooutdoors-holden
Replied by mojooutdoors-holden on topic Checkout Related Plugin - 500 error after upgrade to J4
Thanks Jerome! After installing new version, i no longer get the 500 errors. However, i did see a php warning come up that i can toggle with the checkout related plugin being published:
Warning: Undefined array key "value" in ****/libraries/src/HTML/Helpers/Select.php on line 494
Warning: Undefined array key "value" in ****/libraries/src/HTML/Helpers/Select.php on line 494
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351247
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Checkout Related Plugin - 500 error after upgrade to J4
Hello,
Where do you have that warning ?
Regards,
Where do you have that warning ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
- Posts: 303
- Thank you received: 18
3 years 5 months ago - 3 years 5 months ago #351250
by mojooutdoors-holden
Replied by mojooutdoors-holden on topic Checkout Related Plugin - 500 error after upgrade to J4
Last edit: 3 years 5 months ago by mojooutdoors-holden.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351286
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Checkout Related Plugin - 500 error after upgrade to J4
Hello,
Thank you for the screenshot.
There is indeed an issue with the HikaShop core which cannot handle "groupedlist" content with Joomla 4.
One possibility is to modify the file "checkout_related_class.php" in order to replace the content
By
But you'll loose the "template" detail in Joomla 4.
The other possibility is to fix the HikaShop core in order to handle groupedlist for J4 ; or to add a new type of content specially for grouped lists.
Regards,
Thank you for the screenshot.
There is indeed an issue with the HikaShop core which cannot handle "groupedlist" content with Joomla 4.
One possibility is to modify the file "checkout_related_class.php" in order to replace the content
Code:
$values[] = array(
'text' => $optGroup,
'items' => $ret
);
Code:
$values[] = $ret;
The other possibility is to fix the HikaShop core in order to handle groupedlist for J4 ; or to add a new type of content specially for grouped lists.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
- Posts: 303
- Thank you received: 18
3 years 5 months ago - 3 years 5 months ago #351396
by mojooutdoors-holden
Replied by mojooutdoors-holden on topic Checkout Related Plugin - 500 error after upgrade to J4
I think the second fix is more robust, but i'll implement your first option for now.
FYI: the latest version of the plugin is broken on Joomla 3.10.11
This breaks the whole backend configuration area, as well as, all checkout pages.
FYI: the latest version of the plugin is broken on Joomla 3.10.11
Code:
plugins/hikashop/checkout_related/checkout_related_class.php
Line: 77
Error: in_array(): Argument #2 ($haystack) must be of type array, null given
This breaks the whole backend configuration area, as well as, all checkout pages.
Last edit: 3 years 5 months ago by mojooutdoors-holden.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351399
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Checkout Related Plugin - 500 error after upgrade to J4
Hello,
I update the plugin with the corresponding fix.
It also contains the modification for "groupedlist" in HikaShop checkout workflow system.
Thus, it requires a small modification in the current version of HIkaShop (until the next release which will include the patch).
File : "administrator/components/com_hikashop/types/checkout_workflow.php"
Replace
By
Regards,
I update the plugin with the corresponding fix.
It also contains the modification for "groupedlist" in HikaShop checkout workflow system.
Thus, it requires a small modification in the current version of HIkaShop (until the next release which will include the patch).
File : "administrator/components/com_hikashop/types/checkout_workflow.php"
Replace
Code:
case 'list':
if(!isset($s['values']))
break;
$ret .= JHTML::_('select.genericlist', $s['values'], $name, 'class="inputbox no-chzn" data-checkout-param="'.$k.'" onchange="window.checkoutWorkflowEditor.onChange(this);"', 'value', 'text', $v);
break;
Code:
case 'list':
if(!isset($s['values']))
break;
$ret .= JHTML::_('select.genericlist', $s['values'], $name, 'class="inputbox no-chzn" data-checkout-param="'.$k.'" onchange="window.checkoutWorkflowEditor.onChange(this);"', 'value', 'text', $v);
break;
case 'groupedlist':
if(!isset($s['values']))
break;
if(!HIKASHOP_J40)
$ret .= JHTML::_('select.genericlist', $s['values'], $name, 'class="inputbox no-chzn" data-checkout-param="'.$k.'" onchange="window.checkoutWorkflowEditor.onChange(this);"', 'value', 'text', $v);
else
$ret .= JHTML::_('select.groupedlist', $s['values'], $name, array('list.attr'=>'class="custom-select" data-checkout-param="'.$k.'" onchange="window.checkoutWorkflowEditor.onChange(this);"', 'group.id' => 'id', 'list.select' => array($v)));
break;
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
- Posts: 303
- Thank you received: 18
3 years 4 months ago - 3 years 4 months ago #351537
by mojooutdoors-holden
Replied by mojooutdoors-holden on topic Checkout Related Plugin - 500 error after upgrade to J4
Unfortunately this change does not resolve the error in Joomla 3.10.11:
Code:
0: in_array(): Argument #2 ($haystack) must be of type array, null given
Last edit: 3 years 4 months ago by mojooutdoors-holden.
Please Log in or Create an account to join the conversation.
3 years 4 months ago #351542
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Checkout Related Plugin - 500 error after upgrade to J4
Hello,
As mentioned previously ; There is the fix for your issue regarding the fact that the variable $exclude_categories can be NULL instead of being an empty array.
The fix check if the variable is empty and force it with an empty array, to avoid the error.
Regards,
As mentioned previously ; There is the fix for your issue regarding the fact that the variable $exclude_categories can be NULL instead of being an empty array.
The fix check if the variable is empty and force it with an empty array, to avoid the error.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.212 seconds