mmaheux
September 18, 2024, 7:04pm
1
I have an error when reindexing files. I get the Handling “Concrete\Core\File\Command\ReindexFileTaskCommand” failed: Call to a member function getFileID() on null
How can the null getfileid() be determined? I assume it is a database error but not sure how to troubleshoot. Thanks for any guidance.
Does seem weird - maybe try clearing the cache before running that task again?
Could this be related to 9.3.4 errors
I created a general issue about error handling within tasks.
opened 12:44PM - 27 Sep 24 UTC
Type:Bug
### Affected Version of Concrete CMS
9.x
### Description
See forum posts
h… ttps://forums.concretecms.org/t/9-3-4-errors/8178
https://forums.concretecms.org/t/to-a-member-function-getfileid-on-nullhandling-concrete-core-file-command-reindexfiletaskcommand-failed-call/8140
Seems to be a trend that tasks are bugging out due to lack of handling for errors within what tasks are doing. Things like files that no longer exist or cached output that no longer exists should not result in fatal errors within task execution.
If you go back in the forums, there are plenty of examples of similar.
### How to reproduce
See all the examples in the forums
### Possible Solution
Generally add defensive code against missing objects, queued objects that fail to reload. Perhaps with some logging, but allow the tasks to continue wherever possible.
### Additional Context
_No response_