support relative paths for eca documentation

Created on 9 March 2023, almost 2 years ago
Updated 10 March 2023, almost 2 years ago

Problem/Motivation

I want to store the documentation locally (in a subdir of my drupal install) and also have it work from any host name, so I don't want have to specify a full URL when deploying from a dev site with a different name. If the documentation domain is set to a relative link, it not only doesn't work, templates no longer appear in bpmn.io.

Steps to reproduce

set the documentation domain in admin/config/workflow/eca/settings to a relative path (e.g. /ecaguide) and then attempt to use object templates in bpmn.io, they will not appear.
change it to a full URL (e.g. http://drupal/ecaguide) and it will work correctly.

Proposed resolution

when the value of documentation domain is set to a relative path, utilize it. also, if it is being validated, and does not validate, templates should still appear but without a documentation link.

✨ Feature request
Status

Active

Version

1.1

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States hyperlogos

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @hyperlogos
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    That validation seems to be contained in the upstream component, i.e. in the bpmn.io javascript package, not in the module here. So, there is nothing we can do about that other than you could open an issue in the bpmn.io project on GitHub and ask them to change their code.

    However, you could easily add the following line to your settings.php to dynamically define the configuration of that domain:

    $settings['eca.settings']['documentation_domain'] = 'https://yourdomain/ecaguide';
    

    Depending on how your deployment and setup is being done, this could be automated, just like you put the $settings['trusted_host_patterns'] into the settings.php as well.

Production build 0.71.5 2024