opencaching / opencaching-pl

The source code of Opencaching.PL (and some other domains)
https://opencaching.pl/
GNU General Public License v3.0
22 stars 33 forks source link

No latest awarded shown on mainpage #1397

Closed harrieklomp closed 6 years ago

harrieklomp commented 6 years ago

On OCNL we miss the Latest awarded on mainpage. Is this something that should set in config or settings file? selectie_133

kojoty commented 6 years ago

yes, I'm going to provide way to configure the startPage. Changes soon.

kojoty commented 6 years ago

@harrieklomp,

I didn't understand the purpose of this issue in last comment. Now I understand that there should be last titled cache but it disappears...

I don't know why - there is no simple switch which disable this part of the view. It seems that there is a problem with preparing the data for it.

*Please check if there is some error in apache error.log around it or check if query: `SELECT FROM cache_titled ORDER BY date_alg DESC LIMIT 1` returns some value.**

andrixnet commented 6 years ago
mysql> SELECT * FROM cache_titled ORDER BY date_alg DESC LIMIT 1;
+----------+--------+-------+--------+-------+-------+------------+--------+
| cache_id | rate   | ratio | rating | found | days  | date_alg   | log_id |
+----------+--------+-------+--------+-------+-------+------------+--------+
|     6878 | 0.3632 |   0.6 |      3 |     5 | -1184 | 2018-02-01 |   2071 |
+----------+--------+-------+--------+-------+-------+------------+--------+
1 row in set (0.00 sec)

This is what appears in the error_log upon homepage load:

[Fri Feb 16 12:51:37 2018] [error] [client 193.231.72.224] PHP Notice:  apcu_fetch(): Unexpected end of serialized data in www.opencaching.nl/Utils/Cache/OcMemCache.php on line 40
[Fri Feb 16 12:51:37 2018] [error] [client 193.231.72.224] PHP Notice:  apcu_fetch(): Error at offset 4310 of 5183 bytes in www.opencaching.nl/Utils/Cache/OcMemCache.php on line 40
[Fri Feb 16 12:51:38 2018] [error] [client 63.143.42.245] PHP Notice:  apcu_fetch(): Unexpected end of serialized data in www.opencaching.nl/Utils/Cache/OcMemCache.php on line 40, referer: http://www.opencaching.nl
[Fri Feb 16 12:51:38 2018] [error] [client 63.143.42.245] PHP Notice:  apcu_fetch(): Error at offset 4310 of 5183 bytes in www.opencaching.nl/Utils/Cache/OcMemCache.php on line 40, referer: http://www.opencaching.nl
kojoty commented 6 years ago

OK, this is some kind of a tip - something is wrong with serialize/unserialize of data stored in apcu - probably something should be quoted - I need to deep dive into this issue :) Yeah!

kojoty commented 6 years ago

@harrieklomp, @andrixnet I spent some time at this and I don't know what is wrong with it without more data - can you provide the results of next two queries:

SELECT * FROM caches WHERE cache_id = 6878 LIMIT 1
SELECT * FROM cache_logs WHERE id = 2071 LIMIT 1

Thanks.

andrixnet commented 6 years ago

At OCNL:

mysql> SELECT * FROM caches WHERE cache_id = 6878 LIMIT 1;
+----------+---------+------------+-----------+----------+---------------------+  ---------------------+---------------------+------+--------+---------+----------  -----------+--------+-----------+-------+--------+---------------------+--------  --------+------+------------+---------+--------------------------------------+--  -------+-------+---------------+----------+------------------+------------+-----  --+-------+-------+-------+-------+--------+------------------+---------------+-  -----------+---------------+------+-------+-------+-----------------+-----------  --+
| cache_id | user_id | name       | longitude | latitude | last_modified       |   okapi_syncbase      | date_created        | type | status | country | date_hidd  en         | founds | notfounds | notes | images | last_found          | desc_la  nguages | size | difficulty | terrain | uuid                                 | w  atcher | logpw | picturescount | mp3count | search_time      | way_length | wp_g  c | wp_nc | wp_ge | wp_tc | wp_qc | wp_oc  | default_desclang | date_activate |   topratings | ignorer_count | node | votes | score | need_npa_recalc | org_user_i  d |
+----------+---------+------------+-----------+----------+---------------------+  ---------------------+---------------------+------+--------+---------+----------  -----------+--------+-----------+-------+--------+---------------------+--------  --------+------+------------+---------+--------------------------------------+--  -------+-------+---------------+----------+------------------+------------+-----  --+-------+-------+-------+-------+--------+------------------+---------------+-  -----------+---------------+------+-------+-------+-----------------+-----------  --+
|     6878 |       1 | De Warande |   5.49545 |  51.2534 | 2018-02-15 14:53:38 |   2018-02-15 14:53:38 | 2014-11-05 17:09:58 |    3 |      1 | BE      | 2014-11-0  5 00:00:00 |      5 |         0 |     1 |   NULL | 2017-11-09 14:57:08 | NL               |    4 |          2 |       4 | 7FFE32A1-D096-E40D-C7F2-9E8BCF30FFA7 |         1 |       |             2 |        0 | 0.33333333333333 |       0.45 |         |       |       |       |       | OB1ADD | NL               | NULL          |            3 |             0 |   14 |     4 |   1.7 |               0 |         10  9 |
+----------+---------+------------+-----------+----------+---------------------+  ---------------------+---------------------+------+--------+---------+----------  -----------+--------+-----------+-------+--------+---------------------+--------  --------+------+------------+---------+--------------------------------------+--  -------+-------+---------------+----------+------------------+------------+-----  --+-------+-------+-------+-------+--------+------------------+---------------+-  -----------+---------------+------+-------+-------+-----------------+-----------  --+
1 row in set (0.00 sec)

mysql> SELECT * FROM cache_logs WHERE id = 2071 LIMIT 1;
+------+----------+---------+------+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------------+---------------------+--------------------------------------+---------------+----------+---------------------+----------------+------+---------+----------------+--------------+-----------------+------------+
| id   | cache_id | user_id | type | date                | text                                                                                                                                                                                                                                              | text_html | text_htmledit | last_modified       | okapi_syncbase      | uuid                                 | picturescount | mp3count | date_created        | owner_notified | node | deleted | del_by_user_id | last_deleted | edit_by_user_id | edit_count |
+------+----------+---------+------+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------------+---------------------+--------------------------------------+---------------+----------+---------------------+----------------+------+---------+----------------+--------------+-----------------+------------+
| 2071 |     6878 |     751 |    1 | 2014-11-07 15:59:00 | <p>Vandaag even een keertje met manlief op pad om een geocache te zoeken. Gelukkig had ik mezelf al een tijd geleden aangemeld op deze website zodat deze geocache gelogd kan worden.</p>
<p>Bedankt voor de leuke wandeling.</p>
<p>Zwaantje</p> |         1 |             1 | 2015-02-02 16:43:47 | 2017-06-04 05:24:02 | 71543DB4-C4F7-CD31-203D-AECFA525D43C |             0 |        0 | 2014-11-30 14:25:46 |              1 |   14 |       0 |           NULL | NULL         |             751 |          1 |
+------+----------+---------+------+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+---------------+---------------------+---------------------+--------------------------------------+---------------+----------+---------------------+----------------+------+---------+----------------+--------------+-----------------+------------+
1 row in set (0.00 sec)
harrieklomp commented 6 years ago

It is the first of the month and on OCNL the Latest awarded shows up again. For now i close this issue. Let see what happens.

kojoty commented 6 years ago

@harrieklomp, this is not fixed. There was something in last cache name or log text what breaks serialization - some special char or I don't know. Unfortunately I can't see it in DB dumps attached by Andrei. I afraid this issue will come back.

harrieklomp commented 6 years ago

Than i reopen this issue. BTW: I do remember it was visible in the beginning of February.

kojoty commented 6 years ago

@harrieklomp - from other hand - I have a problem with this issue - I don't have idea how to debug this problem without access to your server - I can't reproduce it - it can be a matter of text in db or a bug in some package at your server or something other...

This is not critical - so maybe a good solution is to wait for next reproduction and then we'll try to debug it again - what do you think.

harrieklomp commented 6 years ago

It is not a problem to wait for a while. We are busy (with @andrixnet) to setup a new server at Aruba Cloud. This could solve some problems.

kojoty commented 6 years ago

@harrieklomp, please reopen this issue if you get the new reproduction or any idea on how to resolve this issue - right now I have no idea what else I can do in this matter.