abdumalik LiteCart Fan Från Sweden Medlem sedan okt. 2021 abdumalik 7 maj 2023 18:26 Hello there When I go cart page, there is an error sometimes. it is not always if there is error I just refresh the page then error will be gone. Can you have a look at error and explain me what might be a reason it? Fatal error: Uncaught Error: Call to a member function validate() on null in /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/vqmod/vqcache/vq2-pages_ajax_checkout_customer.inc.php:249 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/includes/library/lib_route.inc.php(125): include() #1 /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/index.php(40): route::process() #2 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/futureshop.2.4.4/vqmod/vqcache/vq2-pages_ajax_checkout_customer.inc.php on line 249 I checked the file that error mentioned line, there is nothing wrong with it.
tim Founder Från Sweden Medlem sedan maj 2013 tim 8 maj 2023 13:41 The error suggests that when you are saving the details, $mod_customer fails to initiate the customer modules. Probably because the lines is removed or similar. https://github.com/litecart/litecart/blob/2.5.3/public_html/pages/ajax/checkout_customer.inc.php#L51-L53
abdumalik LiteCart Fan Från Sweden Medlem sedan okt. 2021 abdumalik 8 maj 2023 15:12 it is not removed in file. it mentioned this code on line. 'error' => $order->validate(isset($shipping) ? $shipping : ''), $box_checkout_customer->snippets = [ 'account_exists' => $account_exists, 'subscribed_to_newsletter' => $subscribed_to_newsletter, 'error' => $order->validate(isset($shipping) ? $shipping : ''), ]; echo $box_checkout_customer->stitch('views/box_checkout_customer');``` is it might be a reason because of null value of $shipping variable ?
tim Founder Från Sweden Medlem sedan maj 2013 tim 8 maj 2023 15:58 It doesn't look like mine: $box_checkout_customer->snippets = [ 'account_exists' => $account_exists, 'subscribed_to_newsletter' => $subscribed_to_newsletter, ]; echo $box_checkout_customer->stitch('views/box_checkout_customer');``` Is this a super old version?
abdumalik LiteCart Fan Från Sweden Medlem sedan okt. 2021 abdumalik 9 maj 2023 19:37 it is 2.4.4 v or older. so, it is not necessary right ?
tim Founder Från Sweden Medlem sedan maj 2013 tim 9 maj 2023 21:03 No, you can toss that line. 2.5.x is a version great of fun, I recommend upgrading.