sarapis / orservices

ORServices is an open source, smartphone-friendly directory application that enables you to collect, verify, organize and share information about social services in your community with your stakeholders, beneficiaries, partner organizations and more.
https://sarapis.org/human-services/orservices/
22 stars 15 forks source link

Crash due to analytics table empty #131

Closed royappa closed 7 months ago

royappa commented 7 months ago

Hi, I loaded the database dump 06032024.sql successfully, thanks, and am now trying to start the site. I have had no errors with composer.

Now I am getting the attached crash:

crash_analytics

A little debugging shows that the "analytics" table is empty, from where $analytics is set. I was going to try just inserting some dummy data to get past this, but looking at the structure of the table, there is no "body" column in the table.

Are we maybe missing a migration where that column was added? Thanks.

mysql> select * from analytics;
Empty set (0.00 sec)

mysql> describe analytics;
+----------------+--------------+------+-----+-------------------+-----------------------------------------------+
| Field          | Type         | Null | Key | Default           | Extra                                         |
+----------------+--------------+------+-----+-------------------+-----------------------------------------------+
| id             | int unsigned | NO   | PRI | NULL              | auto_increment                                |
| search_term    | varchar(255) | YES  |     | NULL              |                                               |
| search_results | int          | YES  |     | NULL              |                                               |
| times_searched | int          | YES  |     | NULL              |                                               |
| created_at     | timestamp    | YES  |     | CURRENT_TIMESTAMP | DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
| updated_at     | timestamp    | YES  |     | NULL              |                                               |
+----------------+--------------+------+-----+-------------------+-----------------------------------------------+
6 rows in set (0.00 sec)
royappa commented 7 months ago

For now I just commented out all of ./resources/views/layouts/analytics.blade.php with {{-- and --}} which shows the site's home page, so this is not urgent now, we can return to Google Analytics later.

d9it commented 7 months ago

That's great, we will fix it in the next update.

Thanks.