[BUG] Date field not converted to string for insertion into database on form submission
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start with the BoltForms database-saving path for a form field configured as type: date, using the provided example_form and examples content type as the reproduction. Trace the submitted date value into persistence and verify completion by submitting the form without the DateTime-to-string error and confirming the saved date.
Written by the indexing model from the issue text.
Description
Overview
When using a type: date field on a BoltForms form configuration and also setting the form to save to the database - it throws an error stating that the 'Object of class DateTime could not be converted to string'.
Details
BoltForms Version: 4.1.13
Bolt Version:3.3.6
Install type: Composer install
PHP version: 7.0
Web server: Apache/2.4.18
Reproduction
BoltForms Configuration
example_form:
database:
contenttype: examples
fields:
title:
type: text
date:
type: date
submit:
type: submit
Contenttypes Configuration
examples:
name: Examples
singular_name: Example
fields:
title:
type: text
date:
type: date
This configuration should give you the error. Any form with a field of type: date and that saves to the database of a content type should provide the same error though.
This seems like it was raised and fixed in the past with #3459 but maybe with recent refactoring this has crept back in?
- Dominant language
- PHP
- Stars
- 52
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bolt/boltforms
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·