-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid argument supplied for foreach() in PatternLabListener.php on line 47 #1
Comments
Have a blind fix for this in |
I have now created a StarterKit that should demonstrate the bug. The fix in dev seems to work. The StarterKit is also helpful in demonstrating other bugs, for example patternlab-php-core#16 and #2. Also, if you look at Pattern Partial Nodatafile there seems to be something odd going on with Data Inheritance Plugin... |
Appreciate you putting that together. So I should be able to get by with Tangent but I'm going to build an acid test StarterKit to hopefully catch these issues earlier on in the future. Or at least it'll demonstrate expected input/output. For example, Issue 16 may require an rethink of how I tackle data overall. |
I tested with the Acid Test StarterKit sounds cool! |
Well, I'm finding bugs with pattern-lab/styleguidekit-assets-default#34 |
Really dumb question. How do I add paths to a fairly vanilla set-up? e.g. so |
Hmm, not sure if this is what you mean but there has been automatic support for top-level folders since Twig PatternEngine 0.7.2. A plugin is needed for anything else I think. Didn't the test StarterKit Twig namespace includes work with your setup? |
Not looking like it. I chalk up my forgetting that feature to the fact that I track a lot across PL ;) I'll double-check and see what I could have f'ed up. |
@aleksip - facepalm Namespaces are working. Titles are the include tags wrapped in |
I'm not sure if this is the correct place to post this question, but I'm also running into this issue. In Patternlab all my includes have been changed to twig template namespaces and now there is no lineage link |
bump for interest. currently hitting this bug with basic inheritance |
@nstriedinger @therealpecus You might want to try Data Transform Plugin. It has a slightly different implementation of data inheritance, but it might suit your needs. Using the other features of DTP is completely optional. The latest versions work with Twig PatternEngine only, but v0.10.2 should work with Mustache PatternEngine as well. |
Thanks @aleksip , I'll give it a try! |
Hey, I run into the exact same problem. Data transform doesn't really do what I want... This bug's been here for over a year eh? Does anyone know off-hand how big an issue this is? Like is it just a matter to type checking or does a bunch of this have to be rewritten? I could look at it too, I just... I don't really want to duplicate work here.. |
@nstriedinger @therealpecus @RedLucas I believe everything should now work using Twig PatternEngine v2.1.3. Can you confirm this? |
@aleksip I can confirm that using https://github.com/aleksip/plugin-data-transform works now with the latest Twig PatternEngine. I've also tested this plugin but inheritance seems to only half work. I'm still seeing a couple of I'm very happy to have working lineage as it greatly simplifies Pattern Lab data management. Thanks for everyone's hard work on this! |
@tanc Thanks, good to know! |
It looks like
$patternData["lineages"]
isfalse
in some cases (happened to me with some pseudo patterns), andcount(false)
returns1
. So theif
conditions on line 43 should probably be amended accordingly.The text was updated successfully, but these errors were encountered: