edition-php-drupal-standard icon indicating copy to clipboard operation
edition-php-drupal-standard copied to clipboard

Fatal error - undefined method getinput() when generating

Open malcomio opened this issue 6 years ago • 3 comments

On a brand new install, I get the following error when trying to generate the front end:

PHP Fatal error:  Uncaught Error: Call to undefined method __TwigTemplate_cb87d917ee046806b780332adb3b678cc4ebc7d51303b5fbaa0bca108638e7a0::getinput() in /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Environment.php(467) : eval()'d code:50

Here are the steps I've followed:

  1. composer create-project pattern-lab/edition-drupal-standard mypattern
  2. cd mypattern
  3. composer start
  4. in a separate terminal window, go into the mypattern directory
  5. php core/console --generate

My system setup is as follows: Composer version 1.5.2 2017-09-11 16:59:25 PHP 7.1.11 (cli) (built: Oct 27 2017 11:00:03) ( NTS ) MacOS 10.13.6

composer create-project pattern-lab/edition-drupal-standard mypattern
Installing pattern-lab/edition-drupal-standard (v2.2.0)
  - Installing pattern-lab/edition-drupal-standard (v2.2.0): Loading from cache
Created project in rmlpattern
> PatternLab\Installer::setProjectInstall
> PatternLab\Installer::getSuggestedStarterKits
> PatternLab\Installer::getConfigOverrides
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 19 installs, 0 updates, 0 removals
  - Installing pattern-lab/styleguidekit-assets-default (v3.5.2): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing pattern-lab/styleguidekit-twig-default (v3.0.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing symfony/polyfill-ctype (v1.9.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing twig/twig (v1.35.4): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing symfony/yaml (v3.4.14): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing symfony/process (v3.4.14): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing symfony/finder (v3.4.14): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing symfony/filesystem (v3.4.14): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing symfony/event-dispatcher (v3.4.14): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing shudrum/array-finder (v1.1.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing seld/jsonlint (1.7.1): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing michelf/php-markdown (1.8.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing kevinlebrun/colors.php (1.0.3): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing doctrine/collections (v1.4.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing alchemy/zippy (0.3.5): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing pattern-lab/core (v2.9.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing pattern-lab/patternengine-twig (v2.2.2): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing pattern-lab/drupal-twig-components (v2.2.0): Loading from cache
> PatternLab\Installer::postPackageInstall
  - Installing aleksip/plugin-data-transform (v1.2.0): Loading from cache
> PatternLab\Installer::postPackageInstall
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter)
Writing lock file
Generating autoload files
> PatternLab\Installer::postUpdateCmd
the path ./source/_twig-components/filters already exists. merge or replace with the contents of pattern-lab/drupal-twig-components package? M/r > r
contents of ./source/_twig-components/filters have been replaced by the package's content...

the path ./source/_twig-components/functions already exists. merge or replace with the contents of pattern-lab/drupal-twig-components package? M/r > r
contents of ./source/_twig-components/functions have been replaced by the package's content...

the path ./source/_twig-components/tags already exists. merge or replace with the contents of pattern-lab/drupal-twig-components package? M/r > r
contents of ./source/_twig-components/tags have been replaced by the package's content...


suggested starterkits that work with this edition:

  1: pattern-lab/starterkit-twig-demo
  2: pattern-lab/starterkit-twig-drupal-minimal
  3: aleksip/starterkit-shila-drupal-theme
  4: forumone/starterkit-twig-drupal-gesso

choose an option or hit return to skip: (ex. 1) > 1

downloading the starterkit. this may take a few minutes...
finished downloading the starterkit...
a starterkit is already installed. merge the new files with it or replace it? M/r > r
installing the starterkit files...
starterkit files have been installed...
cleaning up the temp files...
the starterkit installation is complete...

Thank you for installing...

(                               (
)\ )        )   )               )\ )         )
(()/(   ) ( /(( /(  (  (        (()/(    ) ( /(
/(_)| /( )\())\())))\ )(   (    /(_))( /( )\())
(_)) )(_)|_))(_))//((_|()\  )\ )(_))  )(_)|(_)\
| _ ((_)_| |_| |_(_))  ((_)_(_/(| |  ((_)_| |(_)
|  _/ _` |  _|  _/ -_)| '_| ' \)) |__/ _` | '_ \
|_| \__,_|\__|\__\___||_| |_||_||____\__,_|_.__/

composer start

php core/console --generate
configuring pattern lab...
PHP Fatal error:  Uncaught Error: Call to undefined method __TwigTemplate_cb87d917ee046806b780332adb3b678cc4ebc7d51303b5fbaa0bca108638e7a0::getinput() in /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Environment.php(467) : eval()'d code:50
Stack trace:
#0 /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_e3395681ed42013d40ffe03f163864d1d9e831fe1c0e01f210d6af0cd93d309d->doDisplay(Array, Array)
#1 /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array)
#2 /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array)
#3 /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Environment.php(363): Twig_Template->render(Array)
#4 /Users/malcolm/Documents/Code/mypattern/vendor/pattern-lab/patternengine-twig/src/PatternLab/PatternEngine/Twig/Loaders/PatternLoader.php(120): Twig_Environment->r in /Users/malcolm/Documents/Code/mypattern/vendor/twig/twig/lib/Twig/Environment.php(467) : eval()'d code on line 50

malcomio avatar Aug 08 '18 03:08 malcomio

The same issue happens if I use the twig standard edition:

  1. composer create-project pattern-lab/edition-twig-standard twigstandard
  2. cd twigstandard
  3. php core/console --generate

malcomio avatar Aug 08 '18 03:08 malcomio

Issue is with the twig starterkit, and the fix described here worked for me: https://github.com/pattern-lab/starterkit-twig-demo/issues/15

please note, in the most recent install step 2 needs to be: {% extends "@templates/00-layouts/01-page-2col.twig" %}

sjtuffin avatar Sep 10 '18 18:09 sjtuffin

Hi guys. For anyone landing in here, check what was done in this PR https://github.com/pattern-lab/starterkit-twig-demo/pull/18

heitoralthmann avatar Nov 19 '18 19:11 heitoralthmann