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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

redlanne created an issue. See original summary.

Jeff Burnz’s picture

Is it the colon in the label string? Should be quoted? I.e.:

label: "Adaptivetheme Two Column: 2-10"

Jeff Burnz’s picture

Component: Theme Generator (dep, see AT Tools module) » Layouts (Page Layout, Layout Plugin)
Assigned: Unassigned » Jeff Burnz
Status: Active » Needs review
FileSize
4.98 KB

Lets quote those strings.

redlanne’s picture

I 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?

Jeff Burnz’s picture

Status: Needs review » Reviewed & tested by the community

I'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.

  • Jeff Burnz committed 21280ab on 8.x-1.x
    Issue #2850216: AT core yaml files strict parsing not working
    
Jeff Burnz’s picture

Status: Reviewed & tested by the community » Fixed

Cheers!

  • Jeff Burnz committed 21280ab on 8.x-2.x
    Issue #2850216: AT core yaml files strict parsing not working
    
Jeff Burnz’s picture

Status: Fixed » Active

Roll back on 1.x, needs to be reapplied to 1.x for 8.x-1.0-rc3

  • Jeff Burnz committed 154c9b1 on 8.x-1.x
    Issue #2850216 by Jeff Burnz: AT core yaml files strict parsing not...
Jeff Burnz’s picture

Status: Active » Fixed

Again… reapplied to 1.x for 8.x-1.0 next release

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.