Version 4.2.5

Released: May 21, 2022

Status: Stable

Changes

Converter

Fixed the asset transformations hash calculation. This fixes the issue where uploading a new file for an asset already added via transformation to a document page would not update the asset image in the document page.

Fixes a wrong parameter in the ImageDraw.Draw usage of the TransformationDrawRectangle transformation.

Added sanity check to reject negative zoom values for the TransformationZoom transformation.

Dependencies

Updated Django from version 3.2.12 to 3.2.13.

Documents

Fixed favorite document links reacting to favorite documents beyond the active user.

REST API

Fixed the asset image API view docstring. The docstring incorrectly displayed “document” instead of “asset”.

Task manager

Added Celery queue deduplication to the CeleryQueue class. There are no reported cases of duplicated queues but this will prevent possible issues.

Enabled app tests that were added but not enabled.

Added support for runtime removal of queues. This is not used by the core system but is useful for third party apps wanting to remove queues defined by the core apps.

User management

Added a warning message when users attempt to delete their own accounts.

Other

  • Remove unused authentication view.

  • Remove unused event link.

  • Make document version OCR submit view messages translatable.

  • Make file caching purge view messages translatable.

  • Make document file metadata submit view messages translatable.

  • Fix repeated model manager definition in DocumentFilePage models.

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

  1. Stop supervisord:

    sudo systemctl stop supervisor
    
  2. Make a backup of your supervisord file:

    sudo cp /etc/supervisor/conf.d/mayan-edms.conf /etc/supervisor/conf.d/mayan-edms.conf.bck
    
  3. Make a backup of your database:

    Use the respective backup command for the database:

  4. Upgrade to the latest pip version:

    sudo --user=mayan /opt/mayan-edms/bin/pip install --upgrade pip
    
  5. 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
    
  6. 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.

  7. Update the Redis configuration to serve at least 3 databases:

    Replace:

    databases ...
    

    with:

    databases 3
    
  8. Restart Redis for the changes to take effect:

    sudo systemctl restart redis
    
  9. 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'}
    
  10. 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"
    
  11. Edit the supervisord configuration file and update any setting specific to your installation:

    sudo vi /etc/supervisor/conf.d/mayan-edms.conf
    
  12. 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
    
  13. Start supervisord:

    sudo systemctl start supervisor
    
  14. 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 #1104 Links ‘Add to favorites’ and ‘Remove from favorites’ should be shown according to user favorites