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

Cannot delete the last item in a list in a theme #3018

Open
artofthesmart opened this issue Sep 27, 2020 · 1 comment
Open

Cannot delete the last item in a list in a theme #3018

artofthesmart opened this issue Sep 27, 2020 · 1 comment

Comments

@artofthesmart
Copy link

artofthesmart commented Sep 27, 2020

Looks like there's a glitch where the last item in a list theme setting cannot be deleted.

Steps to reproduce:

  1. Install Grav + Admin.
  2. Install the Hypertext theme, a bare-bones theme with a list item in the 3rd tab. Theme blueprint YAML file, see line 266.
  3. Add a few off-site links. Save.
  4. Delete all but one link. Save.
  5. Delete the last link. Save.

Expected Behavior: The list will be saved as empty.
Actual Behavior: The page refreshes and the last list item is still in the list.

What I've tried

  1. Double checked that the permissions on the /user/config/themes/hypertext.yaml file are correct and editable by the host user/group. No change.
  2. Double checked that there are no "Default" links in the hypertext.yaml file that comes with the theme, that might be overwriting the emptiness with some default. Nothing there.
@mahagr
Copy link
Member

mahagr commented Sep 28, 2020

Yes, this is known bug as when the field gets empty, it sends no data back, which is considered to be "field was not sent".

This bug has already been fixed in pages in Grav 1.7, which uses Flex Objects and Form plugin, which has the fix.

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

2 participants