Skip to content
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

Bones theme crashes with Grav 1.6.6 #2468

Closed
ThosG opened this issue Apr 20, 2019 · 10 comments
Closed

Bones theme crashes with Grav 1.6.6 #2468

ThosG opened this issue Apr 20, 2019 · 10 comments
Labels

Comments

@ThosG
Copy link

ThosG commented Apr 20, 2019

After update to 1.6.6, Bones theme crashed with error

"Property 'inlinejs_pipeline_before_excludes' does not exist in the object!"

Following advice from iusvar I added
protected $inlinejs_pipeline_before_excludes;
to the file
/system/src/Grav/Common/Assets.php
on line 53 and was well.

Bones theme is at v 0.5 and hasn't been updated for 3 years afaics.

Over to you, folk.

@rhukster
Copy link
Member

I'll take a look... cheers.

@rhukster rhukster added the bug label Apr 20, 2019
@rhukster
Copy link
Member

Yup, i see.. i moved some things around, but only moved css and js, not the inlinecss and inlinejs vars.

I'll move those for next release.

@ThosG
Copy link
Author

ThosG commented Apr 20, 2019 via email

@rhukster
Copy link
Member

I would recommend using Quark for a base as that uses latest best practices. We did go back and update all our themes to use the recommended asset structure, but didn't go any deeper than that. This is one of the first themes we released, and as such many new features have been added, and better ways of doing things have been discovered.

However, your issue can probably be fixed. The issue is that Grav 1.6 uses the latest and greatest libraries including Yaml parser which is more strict than it used to be. Before it would allow broken or invalid yaml that it should not have, those issues are now appearing. it's not because Grav 1.6 is broken, its actually because things were broken before, but you just didn't know it.

I would need to see the underlying .md files though to know what is causing the issue. Can you zip it up and send it to me? perhaps via DM on Discord chat?

@ThosG
Copy link
Author

ThosG commented Apr 20, 2019 via email

@ThosG
Copy link
Author

ThosG commented Apr 20, 2019 via email

@rhukster
Copy link
Member

rhukster commented Apr 20, 2019

ok, pretty clear the problem is quite widespread in this content.. you have pages that have:

content:
   items:
       '@page.descendants': '/cantatas'
       '@page.descendants': '/largerworks'
       '@page.descendants': '/concertedvoices'
       '@page.descendants': '/arrangements'

This is not legal because @page.descendants is an array key, and you can't have duplicate array keys.

All of these pages should have structure like this:

content:
   items:
      -  '@page.descendants': '/cantatas'
      -  '@page.descendants': '/largerworks'
      -  '@page.descendants': '/concertedvoices'
      -  '@page.descendants': '/arrangements'

@ThosG
Copy link
Author

ThosG commented Apr 20, 2019 via email

@rhukster
Copy link
Member

rhukster commented Apr 20, 2019

That YAML Linter idea was a good one... I have added a new CLI command, plus a new section to the Admin plugin's Tools -> Reports section that will show you any linting errors in Grav configuration or pages.

$ bin/grav yamllinter                                                                                                                [17:38:59]

Yaml Linter
===========

User Configuration
------------------


 [ERROR] YAML Linting issues found...


/user/config/test.yaml - Duplicate key "foo" detected at line 2 (near "foo: baz").

Pages Frontmatter
-----------------


 [OK] No YAML Linting issues with pages

Image 2019-04-20 at 5 45 29 PM

This is now in develop branch and will be available in Grav 1.6.7

@ThosG
Copy link
Author

ThosG commented Apr 21, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants