In our project, we have some legacy code that performs a node_load() during a hook_init() call in a custom module. When Drupal is bootstrapped using a script in a non-Drupal document root (common for PHPUnit testing), the following error is thrown:
Call to undefined function htmLawed() in /var/www/drupal/sites/all/modules/contrib/htmlawed/htmLawed.module on line 84
This is happening during drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);, which calls our init hook, which loads a node, then loads a field, then loads a filter, then fails at _htmLawed_process()
The error occurs because the htmLawed module needs a tweak to load library modules according to https://www.drupal.org/node/1342238
The attached patch changes the library load and fallback loading of the htmLawed php file according to "spec".
| Comment | File | Size | Author |
|---|---|---|---|
| 7.x-3.x-libraries-patch.patch | 1.01 KB | hedinfaok |
Comments
Comment #2
hedinfaok commentedComment #3
alpha2zee commentedThanks for noticing this issue, and for providing the patch. I will release a new version to fix the issue but it will take a couple of weeks (I am traveling).
Comment #4
alpha2zee commented@hedinfaok: I finally got the time to examine this issue. On my system, with the latest versions of Drupal 7, and htmLawed and Libraries modules for Drupal 7, I do not see this issue; that is, everything seems to work as expected. Looking at the patch that was provided, I do not see any logical issue in the original htmLawed module code which the patch is meant to correct. Can you provide some more details or any comment? Thanks.
Comment #5
alpha2zee commented