Admin custom datetime doesn't get saved
- Dominant language
- PHP
- Stars
- 15.7k
- Forks
- 1.4k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 12
Description
When editing custom header with datetime type it gets saved only when it was blank. When there is a value saved in page .md file it doesn't save again date and time selected with timepicker.
It works fine when changed in Expert mode in md file or directly in default.md file.
Is it because it's default or there is any other problem?
My blueprint default.yaml file:
```yaml
title: Page Content
@extends:
type: default
context: blueprints://pages
form:
fields:
tabs:
type: tabs
active: 1
fields:
content:
type: tab
fields:
header.taxonomy:
type: taxonomy
label: tags
multiple: true
validate:
type: array
header.date:
type: datetime
label: Reserved
toggleable: true
help: Please select how long the advert is reserved for.
```
Steps to reproduce:
1. Add custom header with datetime in blueprints
2. Edit and save it in admin / page
3. Try editing and saving again - doesn't change on save - gets back to old value
Contributor guide
Research direction
Reproduce the second-save failure using the supplied default.yaml blueprint, a page .md file with an existing date, and the Admin timepicker; compare it with Expert mode and default.md behavior. Trace the Admin save path for the custom datetime header field, then verify that changing an existing value persists on a second save.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100