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

Unexpected error messages on Save #626

Closed
paulhibbitts opened this issue May 28, 2016 · 9 comments
Closed

Unexpected error messages on Save #626

paulhibbitts opened this issue May 28, 2016 · 9 comments

Comments

@paulhibbitts
Copy link
Contributor

I've started to use the updated Frontmatter editor in b5, and I am seeing some unexpected error messages when I try to Save.

For example:
2016-05-28_06-44-11

When trying to save this page:


---
title: Home
blog_url: blog
body_classes: header-image fullwidth

sitemap:
    changefreq: monthly
    priority: 1.03

modular_content:
    items: '@self.modular'
    order:
        dir: desc

content:
    items: '@self.children'
    order:
        by: date
        dir: desc
    limit: 14
    pagination: true

feed:
    description: Course Hub Description
    limit: 10

pagination: true

---

Earlier I seemed to get a bit different message with the same Frontmatter (this is the image I shared in the Gitter room):
2016-05-26_06-18-34

I've also attached the full user folder (which I am testing with b5).

Thanks very much,
Paul
user.zip

@JohnMica
Copy link

same here and here is the link to user folder https://www.dropbox.com/sh/0udjvi217if75w8/AAB4wznbMLJcepADkoO987dWa?dl=0

hope it help figuring out what is going on.

i have 3 blog.ro.md pages, 2 work with no errors on save the 1 under blog folder is showing error when saving (similar to Paul

@flaviocopes
Copy link
Contributor

The sitemap.priority value expects a string, so enclose the value in quotes, like " ". This will work.

On the other hand, the "Max Item Count" problem is an actual bug. Looking at it.

@flaviocopes
Copy link
Contributor

The problem is in the blog.yaml definition in the theme blueprints.. using type: int fails, using type: number works. Not sure why type: int fails in expert mode but works in normal mode.

@paulhibbitts
Copy link
Contributor Author

Hi Flavio, thanks very much for looking into it. I can verify both suggestions work on my Grav install.

BTW, is there a way to apply this change to a Blueprint within an inherited theme vs. the original source theme? Just wondering if I can somehow make this change in my inherited theme until the source theme gets updated. Thank you.

@flaviocopes
Copy link
Contributor

Yes I think you can just copy the [template]/blueprints/blog.yaml file to your theme, and edit it.

@paulhibbitts
Copy link
Contributor Author

Thanks Flavio, I just tried that but no go, the original error re-occurs :-( Is that a supported use case and a bug or something not actually supported? It would be a very useful technique!

@flaviocopes
Copy link
Contributor

I thought it worked, as it's for templates.. never tried actually! So not sure. Needs to be fixed in Admin btw I think, rather than in the theme

rhukster added a commit to getgrav/grav-plugin-sitemap that referenced this issue May 30, 2016
@rhukster
Copy link
Member

Ok this is fixed in two parts:

  1. Validation for sitemap priority should of been 'float' not 'string'. That has been rereleased.

  2. Validation was defaulting to Validation::typeText() for all fields that didn't have a function defined, this was incorrect. Skips the function check if it doesn't exist now. getgrav/grav@4fbf432

@paulhibbitts
Copy link
Contributor Author

Thank you!

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

No branches or pull requests

4 participants