The library filter does not work in using drush pklu / patternkit-lib-update

Created on 13 January 2023, almost 2 years ago
Updated 16 March 2023, over 1 year ago

Problem/Motivation

Trying to update all existing component using a specific library gets ignored.

Steps to reproduce

In the patterns table, my library is patternKit
In my patternkit_field_data my pattern_id is *@patternKit/layouts/band/band*
Running the folllowing command
drush pklu @pattternKit node.page.default
It will process 0 due to the following due to the following condition
https://git.drupalcode.org/project/patternkit/-/blob/9.1.0-beta6/src/Upd...

// Don't update patterns outside the indicated library if provided.
    if ($library_name && $pattern->getLibrary() !== $library_name) {
      return FALSE;
    }

Where $library_name is @patternKit but $pattern->getLibrary() is patternKit
Even with the following will also failed the condition
drush pklu pattternKit node.page.default
due to the first condition check https://git.drupalcode.org/project/patternkit/-/blob/9.1.0-beta6/src/Upd...

Proposed resolution

Update the condition so that works with *@libraryname* as the example given in the drush command.

Remaining tasks

Update the logic in UpdateHelper->updateBlockComponentPattern().

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

9.1

Component

Module Core

Created by

πŸ‡ΊπŸ‡ΈUnited States johnle

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024