Multiple issues with Asset generation
I am unable to add assets in version 4.1 (I was also unable to add assets in version 4.0.x, but for a different reason, described below.)
I have created a PNG file which I want to use as a decoration on a version of a document (basically a CONTROLLED COPY stamp). When I create a new asset with this PNG file, the preview of the image is broken when I attempt to view the asset. The server logs report the following error:
[2021-10-14 22:49:20,077: ERROR/ForkPoolWorker-1] Task mayan.apps.converter.tasks.task_content_object_image_generate[501e26e5-6fd8-4c7e-8123-bcb7389fb856] raised unexpected: TypeError("generate_image() got an unexpected keyword argument 'maximum_layer_order'")
I've confirmed that the generate_image method is being called on an object of the type content.models.Asset, which indeed only accepts the "user" keyword argument.
As an attempted hack to get it working, I modified line 47 in converter/tasks.py to only send the user keyword argument and not maximum_layer_order or transformation_instance_list. If I do that, I get a different error which is the same error I was getting in mayan 4.0.x:
mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
This is similar to an issue I had with document previews when I first migrated to version 4.0 which I resolved by following the recommendation to rename document_storage to document_file_storage. However, the issue now seems to be strictly related to Assets.