πŸ‡ΊπŸ‡ΈUnited States @Yujiman85

Account created on 24 January 2022, over 2 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

Any update on this? I'm having a very similar issue.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

Gave it some more thought and came up with another revision.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

I agree with #6, that is a bit clearer so I updated the MR. Thank you. Is that clear enough without having to state that the libraries are registered by $extension? I guess "Can either be 'core' or the machine name of the extension that registered the libraries." kinda clears that up.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

I added some examples of other data types, added a note about using "\" before classes. Just need confirmation that the examples used and the note about classes are okay.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

I tried to add some clarity as to how libraries are referenced in the code as well as provide an example.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

Yujiman85 β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

Since this technically works like it's supposed to after changing how the namespaces are structured, I'm going to move this over to "Closed (works as designed)". If that isn't right someone please move it back. The documentation for the API is there but it's two clicks deep from the module page, maybe there could be a more noticeable section highlighting how to structure the namespaces? Especially now since the old way doesn't seem to work after moving to v3.

πŸ‡ΊπŸ‡ΈUnited States Yujiman85

I had the same issue with templates not being defined in Twigs using "extends" after the update to the latest version. It seems I was able to fix the situation by updating the namespaces in the info.yml file for my custom theme from the old API to the new one as per https://www.drupal.org/docs/contributed-modules/components/registering-twig-namespaces β†’ . Not sure if this will work for anyone else but worth a shot if your situation is at all similar.

Old:

component-libraries:
  [THEMENAME]:
    paths:
       - components 

New:

components:
  namespaces:
    [THEMENAME]:
      - components

So far I haven't run into any breaking issues but if I do I'll come back to update

Production build 0.69.0 2024