Version 4.1.3

Released: November 2, 2021

Status: Stable



The copying of the bootstrap alert style was fixed. Alert styles now change when the theme changes.

The copying of the bootstrap alert style was optimized by executing it only in the root template. This runs the code just once instead of running it on each page refresh. The element #div-javascript-dynamic-content was also removed and it is now created and destroyed dynamically once just.


An asset duplication bug in the percent coordinate transformation was fixed.

The cache_hash method of the Transformation class was split to allow subclasses to modify how the cache hash is calculated.

The asset transformations now include the image hash as part of the transformation hash calculation. This change allows automatic invalidation of all cached document images that use an asset if the asset image is modified.

The way the absolute coordinates of the percentage asset paste transformation were calculated has been updated to more closely reflect the purpose of the transformation. Minimum (0) or maximum (100) coordinate values does not cause the asset to clip outside of the image borders anymore.


The Sentry client backend received some updates to increase its usefulness. More SDK options were added. Sentry options are now typecasted from Mayan settings to ensure proper data types.

Celery and Redis instrumentation integration was added to the Sentry client backend.

The default value of traces_sample_rate option was lowered from 1 to 0.25. This value is better suited for production deployments. Increase to 1 for full debug information capture during development or testing.


Several staging folder source fixes and patches were merged. Staging folders now use StreamingHttpResponse to serve previews bringing image processing to the same level as the rest of the code. Code optimizations and simplification were also merged which include better image cache utilization and removal of a potential file descriptor leak.

Staging folders can now generate previews for office document files.

The source backend base class now does not assume all source backends provide an upload form. This expands the usability of the new source backend system introduced in version 4.1 to more stylwe of document sources.

A bug that prevented the SANE scanner source backend to work properly was fixed. The error handling of the SANE scanner source was also improved.

Error logging of non interactive sources was also fixed.


The development Vagrant setup was improved. The virtual machine deployment script now loads all values from the root config.env file. This ensures that the virtual machine is generated using the same libraries, dependencies and paths as the Docker image.

The version of the Supervisord program is now updated automatically.

The way APT and PIP proxies are configured was updated to match how they are processed in the rest of the code base. This allows a single proxy configuration to work with all build methods.

A makefile was added to aid in working with the Vagrant setup.


  • The devpi targets were moved to the main makefile to allow them to be used by all the build methods.


  • None

Upgrade process

Docker Compose

Check the Docker upgrading chapter for the complete upgrade process.

Direct deployment

Upgrading from Mayan EDMS 3.5.x


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 --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.7

    the requirements will also be updated automatically.

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


    databases ...


    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:




    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/ 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/ 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.


Follow the solutions outlined in the troubleshooting section: After upgrade to version 4.1

Backward incompatible changes

  • None

Issues closed

  • GitLab issue #1053 Paste an asset (percents coordinates) transformation duplicates asset

Issues addressed