Problem

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

nravens created an issue. See original summary.

vdsh’s picture

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

  • vdsh committed 5e01f6c on 2.1.x
    Issue #3222778: Breaks Block Configuration
    Moving all rules dependancies...
vdsh’s picture

Status: Active » Fixed

The issue is now fixed by moving all the rules related code to a submodule

Can you please confirm it works as expected?

nravens’s picture

Hi, Thank you for the fix.

I've tried to install the dev version on a localhost but I get the following error:

composer require drupal/libraries_delay_load:2.1.x-dev@dev
./composer.json has been updated
Running composer update drupal/libraries_delay_load
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading drupal/libraries_delay_load (2.1.3 => dev-2.1.x 5e01f6c)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals

Installation failed, reverting ./composer.json and ./composer.lock to their original content.


  [RuntimeException]
  git was not found in your PATH, skipping source download
vdsh’s picture

Hi @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 update

But it believe you will get the same git not found problem

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.