fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
419 stars 290 forks source link

Logs do not show up in /admin/logs #4921

Closed shalak closed 6 months ago

shalak commented 6 months ago

I've configured a docker-compose setup, using NathanVaughn's image.

Everything was working correctly, then, for testing purposes, I changed the config.ini.php entry od dbpass to something wrong. After recreating the containers, it failed to work, as expected. Then I changed it back to the correct password. Please bare in mind that this might be unrelated to the issue, I don't know.

Now, I noticed that there are no logs visible in /admin/logs page. It simply says No records to display.

I connected to the DB using phpMyAdmin and the SELECT * FROM wt_log ORDER BY wt_log.log_time DESC shows the logs, including new ones.

What's going on here? Any ideas on how to debug this?

shalak commented 6 months ago

Huh, today (12:01 CET) it started to work.

I just recalled that around the time the logs stopped working, I noticed that containers are on UTC, so I mounted /etc/localtime. First to the app container (the logs were not showing by then) then to the DB container (still not showing) - also I'm in CET and it was just after midnight my time (i.e. before mounting localtime the containers were on 22nd of December and after the mount they were on 23rd).

I believe this might be related...

miqrogroove commented 6 months ago

There is a major bug in the log filtering subsystem. See #4549

Basically, the 'dates', even the default ones, in the log filter are treated as UTC times and then converted incorrectly to a SQL criteria.

I've written an excellent patch and it's attached to that issue if you want to try it. As for this issue, I think it can be closed as a duplicate.

shalak commented 6 months ago

Duplicate of #4549