Wrong or No viewports are created when installing backstop from the Extend admin page.

Created on 11 November 2024, about 1 month ago

Problem/Motivation

when backstop generator is installed it uses a hook_install hook to create view ports from the active theme.
when enabling the module from terminal using drush pm:install backstop_generator viewports from the default theme are read and inserted to viewports list. But when the module is installed from the site on the Extend (/admin/modules) page no viewports are created.

Turns out this is because the install hook was getting the admin theme (claro) when trying to fetch the active theme since the extend (/admin/modules) page is an admin page.

Steps to reproduce

  1. Make sure your default active theme on your drupal 10 site has theme.breakpoints.yml file. e.g. Oliver works
  2. Install backstop_generator on your site
  3. Go to viewports page (/admin/config/development/backstop-generator/viewports)
  4. The viewports won't be created or will be from breakpoints on your admin theme (not default theme).

Proposed resolution

The module needs to create the viewport entities from the default theme's breakpoints regardless of how it is installed.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India dev20.addweb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024