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
Issue fork patternkit-3333342
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
johnle commentedComment #5
sluceroComment #6
johnle commentedComment #7
johnle commentedTested this against the dev branch and that is now working.
Comment #9
slucero