kdmdrupal β created an issue.
Sorry.
kdmdrupal β created an issue.
After doing more reading on overriding libraries, it turns out what I was trying to do can only be done from a theme info.yml file, and not from a custom module. To override a library from a custom module one has to use hook_library_info_alter.
I have resolved my issue and all is working after implementing the hook_library_info_alter.
Below is what I ended up doing.
function somemodulename_library_info_alter(array &$libraries, $extension) {
if (isset($libraries['drupal.user']['js']) && $extension === 'user'){
unset($libraries['drupal.user']['js']['user.js']);
$libraries['drupal.user']['js']['/' . Drupal::service('extension.list.module')->getPath('replacewith odule name') . '/js/replacewithfilename.js'] = [];
}
Thank you for assisting me with this.
Thank you for the direction. I will try again.
kdmdrupal β created an issue.
Freddy I got the patch to work for 9.5.2 via composer update --lock [painful because it remove Drupal 9.5.2 core and then I had to run command again to install 9.5.2 back]. The drush cim worked afters and our changes were applied. Some errors, but it was due missing components which need to be imported into migration verification sandbox.
NOTE: I would of git apply but the layout_builder didn't have the directory/class for were the patch was being applied.
I will update our Drupal repo to the last version of 9.5.x and run again to make sure all goes smooth next time.
Thank you again for your assistance.
I have hit this issue as well when running drush cim for Drupal 9.5.2 to verify migration process steps.
[warning] Undefined array key "body" FieldBlockDeriver.php:102
Error: Call to a member function getLabel() on null in /web/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php on line 113 #0 /web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver->getDerivativeDefinitions()
We have been developing and trying to apply our changes. Any suggestions?