snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

[Possible bug] Activity report stop working after purge

Open Diniver opened this issue 9 years ago • 10 comments

Hi all,

I am not sure is it a bug and how exactly can explain it but I will do my best. Unfortunately, I cannot reproduce it in demo website due to deactivation of purge function. So, this are my activity reports before purge and purge delete record 01 02 03

After purge I can see my activity report on dashboard 07

If I click on view all I am not getting any results 06

After refreshing 04

05

Unfortunately, laravel.log stays empty. The only log message which I get is from chrome, showed above.

Snipe-IT version | v4.1.3 build 48 (g74aa562) PHP Version | 7.0.22-0ubuntu0.16.04.1 Laravel Version | 5.4.29

Last month I spoke with Snipe about that in chat but she said might be many things. Back then I was not aware what is causing this issue. Now I think is related with purge system. Can someone try to reproduce?

Diniver avatar Nov 09 '17 10:11 Diniver

Unfortunately, laravel.log stays empty.

Are the permissions correct for your storage/logs? Is there anything else in your storage/logs directory?

snipe avatar Nov 13 '17 00:11 snipe

(Also can you tell me what types of things you deleted and then purged so we can try to reproduce locally?)

snipe avatar Nov 13 '17 00:11 snipe

all storage folders are with 775 permissions and the owner is apache user. The log itself is working but there isn't any logs regarding this problem (I deleted the content in the log file before purge).

Basicaly, I have purge a bit of everything assets, licences, users.... I have uploaded my purge deleted records in previous post. image

#Update# If I continue making activities, after certain on point(depends of how many records are per page) it starts working again, but I still have those non working pages. Really weird.

Diniver avatar Nov 13 '17 09:11 Diniver

@Diniver can you click through on that all.js part in the Chrome debugger and show me what part of the JS it highlights?

snipe avatar Nov 22 '17 05:11 snipe

This is what chrome is showing me: new 1.txt It is really ugly code so I am not sure is it of any use. I think I have managed to isolate the bug. It is related with delete and purged users. The code is checking where the item has been checked out but when the user is missing, it cannot find data and it goes bonkers.

Diniver avatar Nov 22 '17 10:11 Diniver

Yeah, that code would be minified, so it's very hard to read. :-/

I'll try to reproduce this by using bad user IDs and see if I can make it happen locally. If so, I'll have a fix out shortly.

snipe avatar Nov 22 '17 10:11 snipe

AHA. I think this is progress. I'll get it fixed on my end and then push something out to develop for you to test.

screen shot 2017-11-22 at 2 33 10 am

snipe avatar Nov 22 '17 11:11 snipe

I will be on holiday until Monday so I will report you then.

Diniver avatar Nov 22 '17 11:11 Diniver

I've only able to reproduce this if I manually (deliberately) mangle the data in the database. When I try a purge, it seems to be correctly deleting the associated join records, so not sure how to resolve that exactly. :-/

I have a fix for the breaking front-end stuff but it will still only show you blank lines where things have been deleted, versus actually removing the log entries from the database (which is what should be happening on purge.)

snipe avatar Nov 22 '17 14:11 snipe

We have this issue with a new fresh 4.8.0

RogerSik avatar Jan 14 '20 15:01 RogerSik