Page 1 of 1

Need a bit of help with website error

Posted: Mon Mar 13, 2023 5:10 pm
by 14Steve14
Sorry for the long post, but I am having problems with the website and it has been offline all day.

Phoenix version 1.7.11
PHP version 7.3 or 4

This morning the website was working fine and the last order placed was at about 8-30am this morning. All weekend it has been fine. Hosts say that there is nothing unexpected their end, but they always say that. Since then customers have been unable to complete the checkout. They can create accounts, add items to their baskets and when trying to checkout they get to the shipping page, which is missing the left column and the bottom half of the page and can get no further obviously as the continue button is missing.

When testing for the error I added an item into the basket, logged in to checkout and clicked on the basket again from the name in the top nav bar and get the following error.
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM WHERE ab.customers_id = 2' at line 1

SELECT FROM WHERE ab.customers_id = 2

[TEP STOP]
You can sometimes actually see the basket contents but only after adding an item. If when adding items you then go to checkout the shipping page is as far as you can get.

There is also an error in the front end error logs which is
thrown in /####/####/public_html/includes/system/versioned/1.0.5.1/customer.php on line 178
[13-Mar-2023 14:04:37 UTC] PHP Notice: Undefined index: address in /####/####/public_html/includes/system/versioned/1.0.5.6/requirements_manager.php on line 23
[13-Mar-2023 14:04:37 UTC] PHP Fatal error: Uncaught Error: Call to a member function format() on null in /####/####/public_html/includes/system/versioned/1.0.5.1/customer.php:178
Stack trace:
#0 /####/####/public_html/templates/default/includes/pages/checkout_shipping.php(123): customer->make_address_label('21700', true, ' ', '<br>')
#1 /####/####/public_html/checkout_shipping.php(52): require('/home/railways/...')
#2 {main}
customer.php line 178 is

Code: Select all

      return $this->guarantee_customer_data()->get_module('address')->format($this->fetch_to_address($to), $html, $boln, $eoln);
requirements_manager.php line 23 is

Code: Select all

        return $this->providers[$field];
The hosts have looked at the database and all seems to be in order. I have used the admin tools to check things like tables and they all seem to be in order. The hosts have uploaded a known working copy of the website code from a known working site day and nothing has changed.

We have also noticed that in the admin backend we cannot see any order data or invoices, but can see customer data which does look to be fine. The only error in the admin error logs is the following
[13-Mar-2023 16:42:59 Europe/London] PHP Notice: Undefined index: address in /####/####/public_html/includes/system/versioned/1.0.5.6/requirements_manager.php on line 23
[13-Mar-2023 16:42:59 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function format() on null in /####/####/public_html/admin14/orders.php:141
Stack trace:
#0 {main}
thrown in /####/####/public_html/admin14/orders.php on line 141
Line 141 is

Code: Select all

<p><?php echo $address->format($order->customer, 1, '', '<br>'); ?></p>
I am about to try removing all the customer data modules to see if that makes any difference once I know what ones are installed from initial install.

Does anyone have any ideas or suggestions on the error so that I can get the website back up and running again?

Re: Need a bit of help with website error

Posted: Mon Mar 13, 2023 7:22 pm
by 14Steve14
Sorted it. More by luck than skill I think. I uninstalled and removed all of the customer data modules and one by one re-installed them and all seems to be working.

Hosts will not admit to anything being wrong their end but there was a problem with the server that the database is on mentioned on their servers page. Whether its related or not I have no idea.