Call getBreakpointGroup() on a non-object in responsive_image.module

Created on 21 July 2015, almost 9 years ago
Updated 16 August 2023, 10 months ago

Problem/Motivation

To reproduce the error:
On a vanilla drupal, with the Responsive image module enabled

  • Create a responsive image style
  • Breakpoint group: Bartik
  • 1x wide > Type: select a single image > Image style: Large
  • 1x narrow > Type: Do not use this breakpoint
  • 1x mobile > Type: Do not use this breakpoint
  • Fallback image style: - empty image -
  • Modify the Article display to use format Responsive image for the image field. Do NOT select a responsive image style.
  • Create an Article node with 1 image
  • Display the image

Now this error is displayed:
Fatal error: Call to a member function getBreakpointGroup() on a non-object in /.../core/modules/responsive_image/responsive_image.module on line 156

Two ways to get rid of the error : Select a responsive image style in Structure > Content types > Article > Manage display. Or, select a different Fallback image style (other than - empty image -) in Configuration > Responsive image styles > your style > edit

Proposed resolution

Set a default Responsible image style when selecting Responsible image as field format.

Remaining tasks

to be determined

User interface changes

none

API changes

none

Data model changes

none

📌 Task
Status

Closed: outdated

Version

11.0 🔥

Component
Responsive image  →

Last updated 12 days ago

Created by

🇮🇳India manishmore

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • 🇺🇸United States smustgrave

    Since this was tagged for updated IS and steps 4 years ago going to close out for now.

    If still a valid task though please reopen updating the issue summary.

    Thanks all!

Production build 0.69.0 2024