Version 4.1.4¶
Released: December 1, 2021
Status: Stable
Changes¶
Appearance¶
An issue that caused the closing of the responsive menu to trigger the home view navigation was fixed.
Some JavaScript optimizations were added:
Cache argument length when in
.fn.hasAnyClass
.Configure fancybox just once.
Set converter image functions as
async
.Remove jQuery’s
one
usage.
Development¶
libjpeg
and libpng
were added to the development setup makefile
target.
Documents¶
An issue with the image generation of the document version first page thumbnail that caused the thumbnail dimensions to be ignored was fixed.
Error logging¶
The resource locking was removed from the error logging. This fixes the random lock error message when using watch folders running from multiple workers.
The error logging instances are now created when the underlying model instance is also created. This removed the need for the resource locking.
The ErrorLog
model was renamed to StoredErrorLog
. This change follows
the normal paradigm when a service is provided by a model and a runtime class.
The name
field of the StoredErrorLog
model was updated to be unique.
This ensures that get_or_create
works in an atomic way when creating
the StoredErrorLog
instance.
When a model instance is deleted, its error log partition is now deleted too, instead of just deleting the error log partition entries.
REST API¶
Added the AutoHelpTextLabelFieldMixin
class. This mixin tries to extract
the label and help text from the model field when the serializer field does
not specify any.
Filtering was added to the parent
field of the index template node
serializers. This restricts options to the current index template and allows
removing the now redundant validation.
The field index_template_root_node_id
was added to the index template
serializer.
Testing¶
A memory database is now used when running the tests.
Other¶
Fix the
AdvancedSearchViewTestCaseMixin
class. It hadGenericViewTestCase
as a base class when it is supposed to be a mixin and not have any.Changes merged from versions 4.0.20 and 4.0.21.
Perform more strict cleanup of test models.
Clean up the test model app config cache after the test end not before the test model is created.
Improve lock manager test cases.
Add standalone Celery beat container.
Removals¶
None
Upgrade process¶
Docker Compose¶
Check the Docker upgrading chapter for the complete upgrade process.
Direct deployment¶
Upgrading from Mayan EDMS 3.5.x¶
Important
Supervisord must be upgraded to version 4.2.2. See troubleshooting section: After upgrade to version 4.1
Stop supervisord:
sudo systemctl stop supervisor
Make a backup of your supervisord file:
sudo cp /etc/supervisor/conf.d/mayan-edms.conf /etc/supervisor/conf.d/mayan-edms.conf.bck
Make a backup of your database:
Use the respective backup command for the database:
Upgrade to the latest pip version:
sudo --user=mayan /opt/mayan-edms/bin/pip install --upgrade pip
Remove deprecated requirements:
sudo --user=mayan curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt --output /tmp/removals.txt \ && sudo --user=mayan /opt/mayan-edms/bin/pip uninstall --requirement /tmp/removals.txt --yes
Update the Mayan EDMS Python package:
sudo --user=mayan /opt/mayan-edms/bin/pip install mayan-edms==4.4.5
the requirements will also be updated automatically.
Update the Redis configuration to serve at least 3 databases:
Replace:
databases ...
with:
databases 3
Restart Redis for the changes to take effect:
sudo systemctl restart redis
Edit the config file at
/opt/mayan-edms/media/config.yml
:Replace:
LOCK_MANAGER_BACKEND: ... LOCK_MANAGER_BACKEND_ARGUMENTS: ...
with:
LOCK_MANAGER_BACKEND: mayan.apps.lock_manager.backends.redis_lock.RedisLock LOCK_MANAGER_BACKEND_ARGUMENTS: {'redis_url':'redis://:mayanredispassword@<IP address of Redis server>:6379/2'}
Update the supervisord configuration file. Replace the environment variables values shown here with your respective settings. This step will refresh the supervisord configuration file with the new queues and the latest recommended layout:
sudo --user=mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \ /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
Edit the supervisord configuration file and update any setting specific to your installation:
sudo vi /etc/supervisor/conf.d/mayan-edms.conf
Migrate existing database schema and static media files with:
sudo --user=mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \ /opt/mayan-edms/bin/mayan-edms.py performupgrade
Start supervisord:
sudo systemctl start supervisor
Clear the browser cache to avoid loading old web assets.
The upgrade procedure is now complete.
Troubleshooting¶
Follow the solutions outlined in the troubleshooting section: After upgrade to version 4.1
Backward incompatible changes¶
None
Issues closed¶
GitLab issue #1057 [4.1] Responsive Design: closing navigation menu redirects to home page
GitLab issue #1061 [4.1] [API] index_template impossible to create node ONLY from the API
GitLab issue #1063 Document version thumbnails are served up as full resolution and not transformed as expected
GitLab issue #1065 [4.1.3] Task mayan.apps.sources.tasks.task_source_process_document raises unexpected LockError