Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Invalid input in "Folder Name"

Solved by David Douglass View solution

Started by David Douglass 4 years ago · 5 replies · 788 views
4 years ago

Invalid input in "Folder Name"

Failed to save entry: Form validation failed, please check your input

This is the error message I get when I try to save a file (default.md) inside its folder. I used a little test text to try to see if I could get it to work -- no luck. I did everything the way it's supposed to be done:

  • Create and name a new folder
  • Select Parent Folder, save
  • Open the folder, enter the Title plus some text in the content area, save
    When I try to save the file, that's when I get the error.
3 years ago

@dpdoug,

I did everything the way it’s supposed to be done

That's an assumption... ;-)

A few things to note..

  • When the system complains about a "Folder name", the name of the folder might be interesting to share...
  • Please read chapters Basic and Content from the docs to get a feel of the concepts of Grav.
    • On the OS, one creates a folder first and then the file inside the folder. That's not how it is done in Grav's Admin.
      In Grav, the concept "Page" consists of a folder + file (*.md). In Admin, a page is created by clicking the "Add Page" menu item. When saving the page, a folder and file (*.md) will be created.
    • Folder: The folder name has meaning for the page. It is the slug shown in the browser and determines if a page is visible or not and its ordering when numbered.
      This folder has specific validation rules. According the docs:

      Folder names should also be valid slugs . Slugs are entirely lowercase, with accented characters replaced by letters from the Latin alphabet and whitespace characters replaced by a dash or an underscore, to avoid being encoded.

    • File: The name of the file, determines the template to be used to render the page, and optionally its language.
  • When using menu "Add Folder", a plain folder will be created in which eg. images can be stored.
  • When editing and saving a plain folder, Admin will try to convert into a Page, for which extra validation rules apply.
3 years ago

The name of the file it complained about was: About Me (about-me)

Is that name not allowed?

3 years ago

@dpdoug,

Invalid input in “Folder Name

The name of the file it complained about was: About Me (about-me)

  • Folder vs File... To prevent a misunderstanding... what is the full path of the folder and its containing file? Like /user/pages/mypage/default.md
  • Have you tried creating a Page (= folder + *.md) using menu item "Add Page"?
last edited 12/24/22 by pamtbaau
3 years ago Solution

For some reason the dash was missing, so I renamed it manually, directly in the folder, and it stopped complaining.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 76 7 hours ago
General · by pamtbaau, 13 hours ago
1 47 12 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago