I have create a sub-theme by using the AT theme generator and then installed it in a Drupal 8 site. As soon as I flush the cache - I receive a WSOD, looking at my log files, I get the following error message:
Feb 6 18:16:00 devportal drupal: https://mysite.com|1486404960|system|9.20.96.145|https://mysite.com/admin/appearance/default?q=admin%2Fappearance%2Fdefau...|https://mysite.com/admin/appearance|1||at_core theme installed.
Feb 6 18:16:01 devportal drupal: https://mysite.com|1486404961|system|9.20.96.145|https://mysite.com/admin/appearance/default?q=admin%2Fappearance%2Fdefau...|https://mysite.com/admin/appearance|1||connect_theme theme installed.
Feb 6 18:16:15 devportal drupal: https://mysite.com|1486404975|php|9.20.96.145|https://mysite.com/?q=|https://mysite.com/|1||Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): scanning error encountered during parsing: mapping values are not allowed in this context (line 15, column 34) in Drupal\Component\Serialization\YamlPecl::errorHandler() (line 63 of /var/aegir/platforms/devportal-8.x-6.0.0.0-20170206-1621/core/lib/Drupal/Component/Serialization/YamlPecl.php).
Feb 6 18:16:17 devportal drupal: https://mysite.com|1486404977|php|9.20.96.145|https://mysite.com/admin/appearance?q=admin%2Fappearance|https://mysite.com/|1||Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): scanning error encountered during parsing: mapping values are not allowed in this context (line 15, column 34) in Drupal\Component\Serialization\YamlPecl::errorHandler() (line 63 of /var/aegir/platforms/devportal-8.x-6.0.0.0-20170206-1621/core/lib/Drupal/Component/Serialization/YamlPecl.php).
Feb 6 18:16:19 devportal drupal: https://mysite.com|1486404979|php|9.20.96.145|https://mysite.com/?q=|https://mysite.com/|1||Drupal\Component\Serialization\Exception\InvalidDataTypeException: yaml_parse(): scanning error encountered during parsing: mapping values are not allowed in this context (line 15, column 34) in Drupal\Component\Serialization\YamlPecl::errorHandler() (line 63 of /var/aegir/platforms/devportal-8.x-6.0.0.0-20170206-1621/core/lib/Drupal/Component/Serialization/YamlPecl.php).
On further investigation I find that line that is causing the error is this one in at_core.layouts.yml
label: Adaptivetheme Two Column: 2-10
Whilst this parses fine if my site is set to use the YamlSymfony parse (i.e. settings.php includes $settings['yaml_parser_class'] = '\Drupal\Component\Serialization\YamlSymfony';) the sites we are developing is using the stricter (but speedier) YamlPecl parser. My temporary workaround is to insert the above setting, but longer term need this fixed from a performance perspective.
Comment | File | Size | Author |
---|---|---|---|
#3 | 0001-Issue-2850216-AT-core-yaml-files-strict-parsing-not-.patch | 4.98 KB | Jeff Burnz |
Comments
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedIs it the colon in the label string? Should be quoted? I.e.:
label: "Adaptivetheme Two Column: 2-10"
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedLets quote those strings.
Comment #4
redlanne CreditAttribution: redlanne commentedI tried out that patch locally and that works great - many thanks for such a quick turn around. When will this fix be in a release?
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedI'll stick it in dev shortly, next day or two (Im pretty busy right now), then I have to prepare the next release which will be rc3, I cant say when, hopefully not too long, next week or two - I need to write some update docs for it because theres a couple of rather fundamental changes from rc2.
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedCheers!
Comment #9
Jeff Burnz CreditAttribution: Jeff Burnz commentedRoll back on 1.x, needs to be reapplied to 1.x for 8.x-1.0-rc3
Comment #11
Jeff Burnz CreditAttribution: Jeff Burnz commentedAgain… reapplied to 1.x for 8.x-1.0 next release