Closed (fixed)
Project:
Lazy-load
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Anonymous (not verified)
Created:
6 May 2019 at 03:05 UTC
Updated:
1 Sep 2023 at 11:35 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedjds23 created an issue. See original summary.
Comment #2
Anonymous (not verified) commentedComment #3
dbgilbert commentedLooks like the issue is that the $image_fields config value is a boolean where the code expects an array. This makes sense given that the update to 2.0 changed the option from a single global switch to an array of switches for each image field. Seems like there should have been an update function in the .install file to handle the transition from 1.x to 2.0.
It seems relatively easy to resolve manually, however. If you find the lazy.settings config file (the one in your export directory, not the one in the module directory) you can manually change the image_fields value from true/false to an empty array [] and then run config import via drush. You may still see warnings but I was able to load pages at least, and access /admin/config/content/lazy to save a new config and pick up any other new config values.
Comment #4
osmanComment #6
osmanThis update fixes two issues which are experienced during an upgrade from 8.x-1.x to 8.x-2.x:
Previously the image fields option was a global switch for all image fields from all entities. As of 8.x-2.x, the image fields can be managed now individually in the image's format settings at the Manage Display pages.
Since there is now more flexibility, I opted not to enable lazy-loading for every single image field. You should enable the fields you need.
As of 8.x-2.x, there is also a new feature: Disabled Pages; where you can define all the paths that should not have lazy-loading enabled at all. The upgrade would omit the default value
/rss.xmland keep the field empty.Comment #7
osman