Moving the module in the file system breaks configured fonts

Created on 11 July 2018, over 6 years ago
Updated 7 June 2023, over 1 year ago

Problem/Motivation

Moving the module around in the file system breaks image captchas because it can no longer the fonts that it set on hook_install().

Proposed resolution

Possibly use a placeholder in default config that is resolved on lookup instead of the hook_install( )code, e.g. %image_captcha_module%/fonts/...

If core would have added support for drupal-module:// streamwrapper then that could be used, but unfortunately...

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Image Captcha (image_captcha)

Created by

🇨🇭Switzerland berdir Switzerland

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • 🇩🇪Germany Anybody Porta Westfalica

    For moving the captcha_image module, an update hook has been implemented in: #3321861: Change image_captcha submodule and test modules location.

    The general problem described here is "by design" and can only be solved by changing the design (reasonable) or individually by updating the locations after moving the module (which would be wrong to automate).

  • 🇩🇪Germany Anybody Porta Westfalica

    If we decide not to change the underlying design, a workaround solution for such cases could be a button to reset / rebuild the default paths or adding inputs for the font paths, prefilled with the defaults?

Production build 0.71.5 2024