Closed (fixed)
Project:
JS delay load
Version:
2.1.3
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2021 at 10:43 UTC
Updated:
1 Aug 2021 at 14:04 UTC
Jump to comment: Most recent
Enabling the module on a drupal 9 site(9.2.0) causes a "The website encountered an unexpected error. Please try again later." when trying to configure blocks. This happened on 3 sites after installing this module. Uninstalling resolved the issue each time.
Comments
Comment #2
vdsh commentedThanks for the bug report. it is indeed an issue when you don't have the rules module enabled. The error is:
Error: Class 'Drupal\rules\Core\RulesConditionBase' not found in include() (line 19 of modules\contrib\libraries_delay_load\src\Plugin\Condition\AdminRoute.php).
This is because indeed, the rules module is not enabled. A quick workaround is to install & enable the rules module, but I am going to do exactly as in https://www.drupal.org/project/scheduler/issues/2790471 and set these conditions in a submodule requiring rules as a pre-requisite.
Comment #4
vdsh commentedThe issue is now fixed by moving all the rules related code to a submodule
Can you please confirm it works as expected?
Comment #5
nravens commentedHi, Thank you for the fix.
I've tried to install the dev version on a localhost but I get the following error:
Comment #6
vdsh commentedHi @nravens,
I don't believe the issue is related to the module itself - but to the fact that composer doesn't know git as written in your error message "git was not found in your PATH, skipping source download"
I found a similar thread on the internet: https://stackoverflow.com/questions/17792588/composer-says-git-not-found
Can you try to just add it to your composer.json, eg:
"drupal/libraries_delay_load": "^2.1.x-dev",and do
composer updateBut it believe you will get the same git not found problem