ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

File: fix creation of metadata (42065)

Open schmitz-ilias opened this issue 4 months ago • 0 comments

Hi @chfsx,

this PR is a possible fix for 42065. The underlying issue is that the file type that ilObjFileMetadata tries to write into the LOM is an empty string, which the LOM API does not accept.

At the end of the creation process, files do have a non-empty file type in their LOM, so somewhere along the line an updateObject or something similar is probably called, and at that point the file type is accessible to ilObjFileMetadata. Looks like something is getting initiated later than expected?

Long story short: depending on whether it is expected for Files to have an empty file type on creation, this PR is more workaround than proper fix. The alternative would be to dig through the Gordian knot that is the object creation process.

Cheers, @schmitz-ilias

schmitz-ilias avatar Oct 21 '24 09:10 schmitz-ilias