Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Integration issue with ui_patterns_pattern_lab in @atoms/09-menu/tab/tab.twig #328

Open
dasginganinja opened this issue Feb 28, 2019 · 2 comments

Comments

@dasginganinja
Copy link
Contributor

A typical use case for Emulsify in Drupal 8 is to use it with UI Patterns and UI Patterns Pattern Lab.
In the most basic example, one would enable Emulsify and its dependencies and then UI Patterns + UI Patterns Pattern Lab which would also install UI Patterns Library.

In the pattern library that is shown (/library is the path on a site) it tries to render /components/_patterns/01-atoms/09-menu/tab/tab.twig, but it is missing a link url and fails to render due to empty data on the link variable.

The Drupal error I received is the following:

InvalidArgumentException: The URI '' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 281 of /app/web/core/lib/Drupal/Core/Url.php).
--

In the (check for attributes)[https://github.com/fourkitchens/emulsify/blob/82c50bfbfc0338b703a79df2364a22e549e066f6/components/_patterns/01-atoms/09-menu/tab/tab.twig#L30] it would be helpful to also check if link['url'] is not empty since that is also a requirement.

@dasginganinja
Copy link
Contributor Author

is the line referenced

@evanmwillhite
Copy link
Contributor

Hey, thanks for reporting and contributing! I tried looking into this but am new to using UI Patterns so I didn't get too far. I see you put up a PR, so hopefully that helped your specific situation. I'll respond on that PR here in a moment.

For anyone else who comes across this, there are a couple of open issues similar to this in other queues:

https://www.drupal.org/project/ui_patterns_pattern_lab/issues/2991243
backlineint/ui_patterns_pattern_lab#17

Those might provide other workarounds for now while we do more research on the PR side.

evanmwillhite pushed a commit that referenced this issue Mar 4, 2019
Per #328, check that the link function has required data before generating a url
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants