System error at checkout

  • Posts: 17
  • Thank you received: 0
4 years 2 months ago #314781

-- url of the page with the problem -- : madebyleah.uk
-- HikaShop version -- : 4.22
-- Joomla version -- : 3.9.14
-- PHP version -- : 7.3.13
-- Browser(s) name and version -- : Chrome 79.0.3945.117
-- Error-message(debug-mod must be tuned on) -- : 0
Error: 0
Cannot pass parameter 3 by reference

Suddenly, I'm getting an error on my website www.madebyleah.uk when I add something to the shop and checkout - its saying that I need to login (which is correct, but normally it comes up with a nice Hikashop message, not this ugly system generated one (which is putting people off and they are leaving the site). Could you advise please?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
4 years 2 months ago #314805

Hi,

Please activate the "error reporting" and "debug mode" settings of the Joomla configuration and try again. The error message should display with more debug information allowing us to better understand the situation. Please provide a screenshot of all the information of the error when you do that.

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0
4 years 2 months ago #314857

Hi there, and thanks for your response.

I already currently have the 'error reporting' set to 'development': and 'debug' set to 'yes'. You can see the errors live for yourself, also the screen grab of what I see on the image I attached on the original post. So, as originally sated "Error: 0 Cannot pass parameter 3 by reference" is the only error message I can manufacture.

If I'm doing anything wrong or missing something, please let me know.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
4 years 2 months ago #314871

Hi,

Then please check the PHP error log of your server.
You should have there a Fatal error message with the text "Cannot pass parameter 3 by reference" in it with also the file path and line number where the error happened. Please provide the full error message.
Also, what you can try is to switch to the default Joomla template and see if the error message contains more information on that page with the default template.

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0
4 years 2 months ago #314879

Hi Nicolas, thanks for that!

I thought I'd start with the easy one first - switching the templates. Which brought up the following:Please let me know if this helps or whether I still need to search for PHP errors.



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
Search
You may wish to search the site or visit the home page.

Search ...
Search ...
Home Page

If difficulties persist, please contact the System Administrator of this site and report the error below.
#0 Cannot pass parameter 3 by reference

/home/kentkrea/public_html/madebyleah/components/com_hikashop/views/checkout/tmpl/login_form.php:94
Call stack
# Function Location
1 () JROOT/components/com_hikashop/views/checkout/tmpl/login_form.php:94
2 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
3 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/administrator/components/com_hikashop/helpers/helper.php:2141
4 hikashopView->loadTemplate() JROOT/components/com_hikashop/views/checkout/tmpl/login.php:53
5 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
6 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/administrator/components/com_hikashop/helpers/helper.php:2141
7 hikashopView->loadTemplate() JROOT/components/com_hikashop/views/checkout/tmpl/step.php:153
8 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
9 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/administrator/components/com_hikashop/helpers/helper.php:2141
10 hikashopView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:230
11 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2124
12 hikashopView->display() JROOT/components/com_hikashop/views/checkout/view_legacy.html.php:48
13 CheckoutViewCheckoutLegacy->display() JROOT/components/com_hikashop/views/checkout/view.html.php:45
14 CheckoutViewCheckout->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
15 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:1862
16 hikashopController->display() JROOT/components/com_hikashop/controllers/checkout_legacy.php:1863
17 checkoutLegacyController->display() JROOT/components/com_hikashop/controllers/checkout.php:65
18 checkoutController->display() JROOT/components/com_hikashop/controllers/checkout_legacy.php:417
19 checkoutLegacyController->step() JROOT/components/com_hikashop/controllers/checkout.php:80
20 checkoutController->step() JROOT/libraries/src/MVC/Controller/BaseController.php:710
21 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:1840
22 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:92
23 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
24 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
25 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
26 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
27 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
28 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
4 years 2 months ago #314889

Hi,

Thanks.
That helps.
Edit the file /components/com_hikashop/views/checkout/tmpl/login_form.php and change the code:

<?php echo $this->cart->displayButton(JText::_('HIKA_LOGIN'), 'login', @$this->params, '',' var b = document.getElementById(\'login_view_action\'); if(b) { b.value = \'login\'; } document.hikashop_checkout_form.submit(); return false;','', 0, 1, 'btn btn-primary'); ?>
to:
<?php
			$params = null;
			if(isset($this->params))
				$params = $this->params;
			echo $this->cart->displayButton(JText::_('HIKA_LOGIN'), 'login', $params, '',' var b = document.getElementById(\'login_view_action\'); if(b) { b.value = \'login\'; } document.hikashop_checkout_form.submit(); return false;','', 0, 1, 'btn btn-primary'); ?>
and that should fix the problem. We'll add the patch on our end.

This actually comes from the fact that you're on PHP 7.3, and that you're using the legacy (old) checkout.
So I would recommend to turn off the "checkout legacy" setting of the HikaShop configuration.

The following user(s) said Thank You: alistair2802

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0
4 years 2 months ago #314900

Can't see where the 'legacy setting is in the checkout configuration, but the replaced code seems to have done the job!

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
4 years 2 months ago #314901

Hi,

It's under the "advanced" tab.

The following user(s) said Thank You: alistair2802

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum