404 error on checkout

  • Posts: 70
  • Thank you received: 3
  • Hikashop Business
2 weeks 6 days ago #311580

-- url of the page with the problem -- : www.kiteoutlet.eu
-- HikaShop version -- : 4.2.1
-- Joomla version -- : Joomla! 3.9.12 Stable [ Amani ] 24-September-2019 15:00 GMT
-- PHP version -- : 7.3.9
-- Error-message(debug-mod must be tuned on) -- : 404

Since yesterday I suddenly get a 404 error when I navigate to the checkout page on my website.



It appears to be an issue with the part of the page containing the login form not being able to load.
The issue only occurs when I set the requirement to log in on checkout to "YES" in the Hikashop Checkout configuration.


When I set this option to "NO" the checkout does load with the question to register. However i want already registered customers to also be able to check out as was always the case before now.
Proceeding to checkout does work when I log in through the separate login module I have placed in the header of the site before I click through to the checkout page.

I have updated to the latest version of Joomla and Hikashop and tried re0installing the Joomla core files, but this has not solved the issue.

Last edit: 2 weeks 6 days ago by Foxworks.

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

  • Posts: 12181
  • Thank you received: 1679
  • MODERATOR
2 weeks 6 days ago #311603

Hello,

I would recommend to activate first the "error reporting" and "debug mode" settings of the Joomla configuration.
That will then display an error message on that blank page which will help us (and you better) understand what's going on and provide a solution.

Kind regards,
Mohamed Thelji.

The following user(s) said Thank You: Foxworks

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

  • Posts: 70
  • Thank you received: 3
  • Hikashop Business
2 weeks 6 days ago #311630

Hi Mohamed,

Thank you for your reply. Unfortunately, when I turn on Debug System in my Joomla configuration, and set public $error_reporting = ‘E_ALL’; in my site's configuration, no debugging or error information is shown on the messed up checkout page.

I've had a look at the page source when I go to the checkout page when not logged in, and it appears that there is a whole lot of code missing. The source code for the page that is displayed (as in the screenshot in my previous message) is as follows:

<div style="display:none;"><a rel="{handler: 'iframe',size: {x: 480, y: 140}}"  id="hikashop_notice_box_trigger_link" href="/index.php/en/checkout/checkout/notice/cart_type-cart/tmpl-component"></a><a rel="{handler: 'iframe',size: {x: 480, y: 140}}" id="hikashop_notice_wishlist_box_trigger_link" href="/index.php/en/checkout/checkout/notice/cart_type-wishlist/tmpl-component"></a></div><div id="hikashop_checkout_page" class="hikashop_checkout_page hikashop_checkout_page_step0">
				<div class="hikashop_wizardbar">
				<ul>
				<li class="hikashop_cart_step_current">
					<span class="badge badge-info">1</span>
Login					<span class="hikashop_chevron"></span>
				</li>

				<li class="">
					<span class="badge badge-">2</span>
						<a href="/index.php/en/checkout/checkout/task-step/step-1">
							Details						</a>
					<span class="hikashop_chevron"></span>
				</li>

				<li class="">
					<span class="badge badge-">3</span>
						<a href="/index.php/en/checkout/checkout/task-step/step-2">
							Overview						</a>
					<span class="hikashop_chevron"></span>
				</li>

				<li class="">
					<span class="badge badge-">4</span>
						<a href="/index.php/en/checkout/checkout/task-step/step-3">
							End						</a>
					<span class="hikashop_chevron"></span>
				</li>

				</ul>
			</div>
		<form action="/index.php/en/checkout/checkout/task-step/step-1" method="post" name="hikashop_checkout_form" enctype="multipart/form-data" onsubmit="if('function' == typeof(hikashopSubmitForm)) { hikashopSubmitForm('hikashop_checkout_form'); return false; } else { return true; }">
			<!-- CLASSIC DISPLAY-->
<h1>Login or continue as a guest</h1>	<div id="hikashop_checkout_login" class="hikashop_checkout_login row-fluid">
			<div id="hikashop_checkout_login_left_part" class="hikashop_checkout_login_left_part span4">
			<fieldset class="input">
				<h2>Login</h2>
				<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr">
<head>
	<title>0 - Error: 0</title>  
    
</head>
<body>
	<div id="wrapper1">
        <div id="wrapper2">
            <div id="error">
            	<h1>404 Error</h1>
              <p>Oops... something went wrong. </p>
                <p> You will be automatically redirected to the home page in 5 seconds.</p>
            </div>
        </div>
    </div>
</body>
</html>

As you can see this is incomplete, and only a bit of the html for the checkout page is loaded without the proper page head body etc. followed by the full head and body for the 404 error page.

The Joomla debug console on the home page does show some database errors:
45 duplicate found!
2 duplicates: #1  #6
2 duplicates: #5  #7
2 duplicates: #15  #18
2 duplicates: #29  #34
2 duplicates: #37  #123
4 duplicates: #38  #40  #124  #126
2 duplicates: #39  #125
4 duplicates: #42  #48  #127  #133
2 duplicates: #44  #129
2 duplicates: #45  #130
2 duplicates: #46  #131
2 duplicates: #47  #132
2 duplicates: #49  #134
2 duplicates: #50  #135
2 duplicates: #54  #138
3 duplicates: #56  #61  #63
2 duplicates: #57  #91
2 duplicates: #90  #95
2 duplicates: #157  #164
2 duplicates: #158  #165

But I do not know what these mean, and how I can fix them. I also am not sue that these have anything to do with the issue of the checkout page giving a 404 error when login is required. It appears as if the PHP that loads the login form in the checkout view maybe is corrupted.

Last edit: 2 weeks 6 days ago by Foxworks.

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

  • Posts: 67199
  • Thank you received: 9963
  • MODERATOR
2 weeks 5 days ago #311632

Hi,

Yes, that's because the processing of the page stops in the middle due to a fatal error.
Activating the error reporting and debug mode of the Joomla configuration, usually helps in displaying the error message.
Try also to switch to the default template of Joomla.
If you don't have an error with the default template, then it means there is an issue with one of the files in the templates/YOUR_TEMPLATE/html/com_hikashop/checkout folder of your website and you would have to rename them one by one to find the one causing the problem.
If you do have the error with the default template, you should hopefully get the fatal error message with the error reporting and debug mode activated. That message will be crutial to better understand the situation on your website.
Alternatively, you can also check the PHP error log of your server where that error should be logged.

The following user(s) said Thank You: Foxworks

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

  • Posts: 70
  • Thank you received: 3
  • Hikashop Business
2 weeks 5 days ago #311656

Hi Nicolas,

Thank you for pointing me in the right way. Switching to the Protostar template let me view the error messages. The one I got was:
Cannot pass parameter 3 by reference

I googled that error message and found thisthis post on here on the forum. That post discussed this error occurring because of using legacy checkout on a PHP 7.3 server.

It turns out my server was recently switched to PHP 7.3 and that broke the legacy checkout process I had running. It now appears to be working again after I disabled legacy checkout.

Best regards,
Chris

The following user(s) said Thank You: nicolas

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

Time to create page: 0.064 seconds
Powered by Kunena Forum