Closed (fixed)
Project:
LMS Xapi
Version:
1.0.0-alpha5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2025 at 16:50 UTC
Updated:
5 Nov 2025 at 15:09 UTC
Jump to comment: Most recent
Files uploaded to a field of the type provided are removed on cron runs.
The record in the file_managed table has status = 0
After the cron run, the package no longer renders, because the reference file entity has been deleted.
Is this intentional? Why would this happen?
Comments
Comment #2
markusa commentedI'm trying to get this to work, here's a patch, but its not quite right.
This will create a file_usage entry when you save the node the xAPI Package field is attached to.
Doing this, the file_managed record gets status=1
This code does not work on file delete / node save. The file_usage record is not deleted, the reference to the file is removed as normal, but the file is still status=1.
Comment #3
markusa commentedAfter patch, the status = 1
It should manage replacing a file with another as well.
Comment #4
graber commentedEdge case as file usage doesn't delete files by default since a long time. Requires fixing nevertheless. The fix is much more simple though.
Comment #6
graber commentedComment #8
markusa commentedYour commit still doesn't work.
After uploading a file and saving the node, the record in the file_managed table has status=0
no file_usage records created.
The file is temporary and deleted on cron runs.
Comment #9
markusa commentedWhoops never mind, had to clear those caches :) Thank you!