René's URL Explorer Experiment


Title: Data inheritance not working · Issue #4 · drupal-pattern-lab/patternengine-php-twig · GitHub

Open Graph Title: Data inheritance not working · Issue #4 · drupal-pattern-lab/patternengine-php-twig

X Title: Data inheritance not working · Issue #4 · drupal-pattern-lab/patternengine-php-twig

Description: I've been trying out the changes from #1 and am struggling to get data inheritance to work. According to @EvanLovely in pattern-lab#36 (comment) this should be working. I'm using a fork of Phase2's pattern lab starter and this is my comp...

Open Graph Description: I've been trying out the changes from #1 and am struggling to get data inheritance to work. According to @EvanLovely in pattern-lab#36 (comment) this should be working. I'm using a fork of Phase2's...

X Description: I've been trying out the changes from #1 and am struggling to get data inheritance to work. According to @EvanLovely in pattern-lab#36 (comment) this should be working. I'm using a fork of ...

Opengraph URL: https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Data inheritance not working","articleBody":"I've been trying out the changes from https://github.com/drupal-pattern-lab/patternengine-php-twig/pull/1 and am struggling to get data inheritance to work. According to @EvanLovely in https://github.com/pattern-lab/patternengine-php-twig/issues/36#issuecomment-322295048 this should be working.\r\n\r\nI'm using a fork of [Phase2's pattern lab starter](https://github.com/phase2/pattern-lab-starter) and this is my composer.json:\r\n\r\n```\r\n{\r\n  \"name\": \"phase2/pattern-lab-starter\",\r\n  \"description\": \"Phase2 Pattern Lab for Drupal based on Pattern Lab's Drupal Edition\",\r\n  \"keywords\": [\r\n    \"pattern lab\",\r\n    \"drupal\"\r\n  ],\r\n  \"homepage\": \"https://github.com/phase2/pattern-lab-starter\",\r\n  \"license\": \"GPL-2.0+\",\r\n  \"authors\": [\r\n    {\r\n      \"name\": \"Evan Lovely\",\r\n      \"role\": \"Lead Developer\"\r\n    }\r\n  ],\r\n  \"support\": {\r\n    \"issues\": \"https://github.com/phase2/pattern-lab-starter/issues\"\r\n  },\r\n  \"autoload\": {\r\n    \"psr-0\": {\r\n      \"PatternLab\": \"core/src/\"\r\n    }\r\n  },\r\n  \"repositories\": [\r\n    {\r\n      \"type\": \"vcs\",\r\n      \"url\": \"https://github.com/drupal-pattern-lab/patternlab-php-core.git\"\r\n    }\r\n  ],\r\n  \"require\": {\r\n    \"php\": \">=5.5.9\",\r\n    \"pattern-lab/core\": \"^2.8.0\",\r\n    \"pattern-lab/patternengine-twig\": \"^2.0.0\",\r\n    \"pattern-lab/styleguidekit-twig-default\": \"^3.0.0\",\r\n    \"pattern-lab/drupal-twig-components\": \"^2.0.0\",\r\n    \"pattern-lab/plugin-faker\": \"^2.0\",\r\n    \"evanlovely/plugin-twig-namespaces\": \"^1.0\",\r\n    \"aleksip/plugin-data-transform\": \"^1.1\"\r\n  },\r\n  \"scripts\": {\r\n    \"post-install-cmd\": [\r\n      \"PatternLab\\\\Installer::postInstallCmd\"\r\n    ],\r\n    \"post-update-cmd\": [\r\n      \"PatternLab\\\\Installer::postUpdateCmd\"\r\n    ],\r\n    \"post-root-package-install\": [\r\n      \"PatternLab\\\\Installer::setProjectInstall\",\r\n      \"PatternLab\\\\Installer::getSuggestedStarterKits\",\r\n      \"PatternLab\\\\Installer::getConfigOverrides\"\r\n    ],\r\n    \"post-package-install\": [\r\n      \"PatternLab\\\\Installer::postPackageInstall\"\r\n    ],\r\n    \"post-package-update\": [\r\n      \"PatternLab\\\\Installer::postPackageUpdate\"\r\n    ],\r\n    \"pre-package-uninstall\": [\r\n      \"PatternLab\\\\Installer::prePackageUninstall\"\r\n    ]\r\n  },\r\n  \"extra\": {\r\n    \"patternlab\": {\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nIt might be entirely possible that I need to install other forked repos but its not clear to me what I need.\r\n\r\nMy understanding is that `aleksip/plugin-data-transform` should provide the data inheritance.\r\n\r\nMy simple test scenario is:\r\n\r\nParent template:\r\n```\r\n\u003cdiv class=\"paragraph-text-only__text-long\">\r\n  {% include \"@atoms/fields/text-long/text-long.twig\" %}\r\n\u003c/div>\r\n```\r\n\r\nIncluded template (text-long.twig):\r\n```\r\n{{ content }}\r\n```\r\n\r\nThe included template also has some associated data in `text-long.json`:\r\n```\r\n{\r\n  \"content\": \"Some test content\"\r\n}\r\n```\r\n\r\nWhen I view the parent template I see errors:\r\n```\r\nNotice: Array to string conversion in /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Environment.php(462) : eval()'d code on line 19 Call Stack: 0.0002 263464 1. {main}() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/core/console:0 0.0393 4339136 2. PatternLab\\Console::run() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/core/console:46 0.0416 4572504 3. PatternLab\\Console\\Commands\\GenerateCommand->run() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/pattern-lab/core/src/PatternLab/Console.php:91 0.0588 6514696 4. PatternLab\\Generator->generate() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/pattern-lab/core/src/PatternLab/Console/Commands/GenerateCommand.php:42 0.0749 6888824 5. PatternLab\\PatternData::gather() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/pattern-lab/core/src/PatternLab/Generator.php:69 0.1822 10144408 6. PatternLab\\PatternData\\Helpers\\PatternCodeHelper->run() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/pattern-lab/core/src/PatternLab/PatternData.php:209 3.0459 41953616 7. PatternLab\\PatternEngine\\Twig\\Loaders\\PatternLoader->render() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/pattern-lab/core/src/PatternLab/PatternData/Helpers/PatternCodeHelper.php:89 3.0459 41953616 8. Twig_Environment->render() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/pattern-lab/patternengine-twig/src/PatternLab/PatternEngine/Twig/Loaders/PatternLoader.php:119 3.1064 43015848 9. Twig_Template->render() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Environment.php:362 3.1064 43032560 10. Twig_Template->display() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Template.php:411 3.1064 43033024 11. Twig_Template->displayWithErrorHandling() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Template.php:403 3.1064 43033096 12. __TwigTemplate_ffe61fee2246b15f94ee22ff8815e151d63c4190ab0da22d17d478f808ff4e6d->doDisplay() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Template.php:432 3.1072 43875792 13. Twig_Template->display() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Environment.php(462) : eval()'d code:33 3.1072 43876064 14. Twig_Template->displayWithErrorHandling() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Template.php:403 3.1072 43876064 15. __TwigTemplate_3275ef305a7d7efaddc7a0078b511bbf2e63fb899408c45405c3479f2c187593->doDisplay() /Users/tanc/Sites/l.install_profile/gitroot/web/themes/custom/site_theme/pattern-lab/vendor/twig/twig/lib/Twig/Template.php:432 Array\r\n```\r\n\r\nIs there anything I'm missing? Any advice on where to start looking?","author":{"url":"https://github.com/tanc","@type":"Person","name":"tanc"},"datePublished":"2017-08-15T08:56:23Z","url":"https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:78889657-5080-6b0f-d872-6b67865733e2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC83C:83E6C:399E60:4E207C:6AFBB6BF
html-safe-noncebab8128cc975f16482c8e87e151a4691a9e5688c745ba6439c384025d3225c41
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODNDOjgzRTZDOjM5OUU2MDo0RTIwN0M6NkFGQkI2QkYiLCJ2aXNpdG9yX2lkIjoiNjQ5MzU5NDQ0OTk4ODAwNzYxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac68f10a8c7836edd9202f20768a529e08d467a120aca96d2e0ccbfd5a5a4bdf14
hovercard-subject-tagissue:250258746
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/drupal-pattern-lab/patternengine-php-twig/4/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ca8ff0a3d45530ca26fbc08a7c133eb816e4703fc8e75761c282d7251928532a/drupal-pattern-lab/patternengine-php-twig/issues/4
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ca8ff0a3d45530ca26fbc08a7c133eb816e4703fc8e75761c282d7251928532a/drupal-pattern-lab/patternengine-php-twig/issues/4
og:image:altI've been trying out the changes from #1 and am struggling to get data inheritance to work. According to @EvanLovely in pattern-lab#36 (comment) this should be working. I'm using a fork of Phase2's...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametanc
hostnamegithub.com
expected-hostnamegithub.com
None2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c
turbo-cache-controlno-preview
go-importgithub.com/drupal-pattern-lab/patternengine-php-twig git https://github.com/drupal-pattern-lab/patternengine-php-twig.git
octolytics-dimension-user_id28110146
octolytics-dimension-user_logindrupal-pattern-lab
octolytics-dimension-repository_id89639036
octolytics-dimension-repository_nwodrupal-pattern-lab/patternengine-php-twig
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id21108033
octolytics-dimension-repository_parent_nwopattern-lab/patternengine-php-twig
octolytics-dimension-repository_network_root_id21108033
octolytics-dimension-repository_network_root_nwopattern-lab/patternengine-php-twig
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee4cce0e99cf61481a318ff12c2e8580153a6c7c6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdrupal-pattern-lab%2Fpatternengine-php-twig%2Fissues%2F4
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdrupal-pattern-lab%2Fpatternengine-php-twig%2Fissues%2F4
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=drupal-pattern-lab%2Fpatternengine-php-twig
Reloadhttps://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
Reloadhttps://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
Reloadhttps://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
drupal-pattern-labhttps://github.com/drupal-pattern-lab
patternengine-php-twighttps://github.com/drupal-pattern-lab/patternengine-php-twig
Codehttps://github.com/drupal-pattern-lab/patternengine-php-twig
Issues4 (4)https://github.com/drupal-pattern-lab/patternengine-php-twig/issues
Pull requestshttps://github.com/drupal-pattern-lab/patternengine-php-twig/pulls
Actionshttps://github.com/drupal-pattern-lab/patternengine-php-twig/actions
Projectshttps://github.com/drupal-pattern-lab/patternengine-php-twig/projects
Wikihttps://github.com/drupal-pattern-lab/patternengine-php-twig/wiki
Security and qualityhttps://github.com/drupal-pattern-lab/patternengine-php-twig/security
Insightshttps://github.com/drupal-pattern-lab/patternengine-php-twig/pulse
https://github.com/drupal-pattern-lab/patternengine-php-twig
New issuehttps://github.com/login?return_to=https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
New issuehttps://github.com/login?return_to=https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
Data inheritance not workinghttps://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4#top
https://github.com/tanc
tanchttps://github.com/tanc
on Aug 15, 2017https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4#issue-250258746
#1https://github.com/drupal-pattern-lab/patternengine-php-twig/pull/1
@EvanLovelyhttps://github.com/EvanLovely
pattern-lab#36 (comment)https://github.com/pattern-lab/patternengine-php-twig/issues/36#issuecomment-322295048
Phase2's pattern lab starterhttps://github.com/phase2/pattern-lab-starter
Sign up for freehttps://github.com/signup?return_to=https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
Sign in to commenthttps://github.com/login?return_to=https://github.com/drupal-pattern-lab/patternengine-php-twig/issues/4
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.