Open Gustry opened 1 year ago
According to the UI, it seems "time only" field are not supported. So I removed them from the Drag&Drop form. It's the same result :
5 editionCtrl->saveFeature() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
6 jCoordinator->process() /srv/lzm/lizmap/www/index.php : 23
2022-12-19 10:14:12 172.19.0.1 error An error has been raised when saving form data edition to db :
2022-12-19 10:14:12 172.19.0.1 error 2022-12-19 10:14:12 172.19.0.1 [403] invalid query (ERROR: date/time field value out of range: "19/12/2022"
LINE 1: ...ield_timestamp_date_only_expr_now_auto" ) VALUES ('19/12/202...
^
HINT: Perhaps you need a different "datestyle" setting.( INSERT INTO "bug"."many_dates" ("field_date_auto_cast", "field_time_auto_cast", "field_timestamp_auto_cast", "field_date_auto", "field_time_auto", "field_timestamp_auto", "field_date_expr_now", "field_time_expr_now", "field_timestamp_expr_now", "field_date_expr_now_auto", "field_time_expr_now_auto", "field_timestamp_expr_now_auto", "field_timestamp_date_only_auto", "field_timestamp_date_only_expr_now", "field_timestamp_date_only_expr_now_auto" ) VALUES ('19/12/2022', '9:14:03', '19/12/2022 9:14:04', '19/12/2022', '9:14:03', '19/12/2022 9:14:03', '19/12/2022', '9:14:03', '19/12/2022 9:14:03', '19/12/2022', '9:14:03', '19/12/2022 9:14:03', '19/12/2022', '19/12/2022', '19/12/2022' ) RETURNING "id";)) /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php 211
/index.php/lizmap/edition/saveFeature
array ( 'module' => 'lizmap', 'action' => 'edition:saveFeature', 'liz_project' => 'dates', 'liz_repository' => 'formation', 'liz_layerId' => 'many_dates_080b18e4_488f_4614_991d_44625b7b7a0e', 'liz_featureId' => '', 'liz_srid' => '0', 'liz_proj4' => '', 'liz_geometryColumn' => '', 'liz_status' => '0', '_submit' => 'submit', '__JFORMS_TOKEN__' => '94dbc5213a63c64e67614a558e81f11db4ebef1b', 'field_date' => array ( 'month' => '', 'day' => '', 'year' => '', ), 'field_timestamp' => array ( 'month' => '', 'day' => '', 'year' => '', 'hour' => '', 'minutes' => '', 'seconds' => '', ), 'field_date_auto_cast' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_auto_cast' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '04', ), 'field_date_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_date_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_date_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_timestamp_date_only' => array ( 'month' => '', 'day' => '', 'year' => '', ), 'field_timestamp_date_only_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_date_only_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_date_only_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'liz_future_action' => 'close', )
0 pgsqlDbConnection->_doQuery() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/db/jDbConnection.class.php : 159
1 jDbConnection->query() /srv/lzm/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php : 771
2 qgisVectorLayer->insertFeature() /srv/lzm/lizmap/modules/lizmap/lib/Form/QgisForm.php : 831
3 Lizmap\Form\QgisForm->saveToDb() /srv/lzm/lizmap/modules/lizmap/controllers/edition.classic.php : 691
4 editionCtrl->saveFeature() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
5 jCoordinator->process() /srv/lzm/lizmap/www/index.php : 23
2022-12-19 10:15:15 172.19.0.1 warning [2] pg_query(): Query failed: ERROR: date/time field value out of range: "19/12/2022"
LINE 1: ...o" ) VALUES ('04/12/2022', '04/12/2022 12:00:00', '19/12/202...
^
HINT: Perhaps you need a different "datestyle" setting.
/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php 207
/index.php/lizmap/edition/saveFeature
array ( 'module' => 'lizmap', 'action' => 'edition:saveFeature', 'liz_project' => 'dates', 'liz_repository' => 'formation', 'liz_layerId' => 'many_dates_080b18e4_488f_4614_991d_44625b7b7a0e', 'liz_featureId' => '', 'liz_srid' => '0', 'liz_proj4' => '', 'liz_geometryColumn' => '', 'liz_status' => '1', '_submit' => 'submit', '__JFORMS_TOKEN__' => '94dbc5213a63c64e67614a558e81f11db4ebef1b', 'field_date' => array ( 'month' => '12', 'day' => '04', 'year' => '2022', ), 'field_timestamp' => array ( 'month' => '12', 'day' => '04', 'year' => '2022', 'hour' => '12', 'minutes' => '00', 'seconds' => '', ), 'field_date_auto_cast' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_auto_cast' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '04', ), 'field_date_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_date_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_date_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_timestamp_date_only' => array ( 'month' => '12', 'day' => '11', 'year' => '2022', ), 'field_timestamp_date_only_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_date_only_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_date_only_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'liz_future_action' => 'close', )
ref:http://localhost:8130/index.php/view/map?repository=formation&project=dates
0 pg_query() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php : 207
1 pgsqlDbConnection->_doQuery() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/db/jDbConnection.class.php : 159
2 jDbConnection->query() /srv/lzm/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php : 771
3 qgisVectorLayer->insertFeature() /srv/lzm/lizmap/modules/lizmap/lib/Form/QgisForm.php : 831
4 Lizmap\Form\QgisForm->saveToDb() /srv/lzm/lizmap/modules/lizmap/controllers/edition.classic.php : 691
5 editionCtrl->saveFeature() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
6 jCoordinator->process() /srv/lzm/lizmap/www/index.php : 23
2022-12-19 10:15:15 172.19.0.1 error An error has been raised when saving form data edition to db :
2022-12-19 10:15:15 172.19.0.1 error 2022-12-19 10:15:15 172.19.0.1 [403] invalid query (ERROR: date/time field value out of range: "19/12/2022"
LINE 1: ...o" ) VALUES ('04/12/2022', '04/12/2022 12:00:00', '19/12/202...
^
HINT: Perhaps you need a different "datestyle" setting.( INSERT INTO "bug"."many_dates" ("field_date", "field_timestamp", "field_date_auto_cast", "field_time_auto_cast", "field_timestamp_auto_cast", "field_date_auto", "field_time_auto", "field_timestamp_auto", "field_date_expr_now", "field_time_expr_now", "field_timestamp_expr_now", "field_date_expr_now_auto", "field_time_expr_now_auto", "field_timestamp_expr_now_auto", "field_timestamp_date_only", "field_timestamp_date_only_auto", "field_timestamp_date_only_expr_now", "field_timestamp_date_only_expr_now_auto" ) VALUES ('04/12/2022', '04/12/2022 12:00:00', '19/12/2022', '9:14:03', '19/12/2022 9:14:04', '19/12/2022', '9:14:03', '19/12/2022 9:14:03', '19/12/2022', '9:14:03', '19/12/2022 9:14:03', '19/12/2022', '9:14:03', '19/12/2022 9:14:03', '11/12/2022', '19/12/2022', '19/12/2022', '19/12/2022' ) RETURNING "id";)) /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php 211
/index.php/lizmap/edition/saveFeature
array ( 'module' => 'lizmap', 'action' => 'edition:saveFeature', 'liz_project' => 'dates', 'liz_repository' => 'formation', 'liz_layerId' => 'many_dates_080b18e4_488f_4614_991d_44625b7b7a0e', 'liz_featureId' => '', 'liz_srid' => '0', 'liz_proj4' => '', 'liz_geometryColumn' => '', 'liz_status' => '1', '_submit' => 'submit', '__JFORMS_TOKEN__' => '94dbc5213a63c64e67614a558e81f11db4ebef1b', 'field_date' => array ( 'month' => '12', 'day' => '04', 'year' => '2022', ), 'field_timestamp' => array ( 'month' => '12', 'day' => '04', 'year' => '2022', 'hour' => '12', 'minutes' => '00', 'seconds' => '', ), 'field_date_auto_cast' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_auto_cast' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '04', ), 'field_date_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_date_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_date_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', 'hour' => '09', 'minutes' => '14', 'seconds' => '03', ), 'field_timestamp_date_only' => array ( 'month' => '12', 'day' => '11', 'year' => '2022', ), 'field_timestamp_date_only_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_date_only_expr_now' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'field_timestamp_date_only_expr_now_auto' => array ( 'month' => '12', 'day' => '19', 'year' => '2022', ), 'liz_future_action' => 'close', )
0 pgsqlDbConnection->_doQuery() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/db/jDbConnection.class.php : 159
1 jDbConnection->query() /srv/lzm/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php : 771
2 qgisVectorLayer->insertFeature() /srv/lzm/lizmap/modules/lizmap/lib/Form/QgisForm.php : 831
3 Lizmap\Form\QgisForm->saveToDb() /srv/lzm/lizmap/modules/lizmap/controllers/edition.classic.php : 691
4 editionCtrl->saveFeature() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
5 jCoordinator->process() /srv/lzm/lizmap/www/index.php : 23
I noticed the one hour difference from my computer versus the server (QGIS/PG)
Tests data have been committed in the repository : 887b75f42, related to another ticket about the display #828
Backport of the test data into 3.6 in aa690d3ec98cfe9a62cf89665a0f3d05fafc8215
What is the bug?
I'm trying to setup a test with many different date, timestamp and time fields
Steps to reproduce the issue
All fields are "NULL" authorized, so in LWC, I should be able to load the form and click save straight.
But when I click
After fixing error using UI and removing microseconds AND/OR dates, I still have an unknown error :
I somehow can't add a QML or ZIP file, so I'm adding the content here :
Versions
QGIS 3.22 with LWC 3.6.0 and master
Check Lizmap plugin
QGIS server version, only if the section above doesn't mention the QGIS Server version
3.22.8
Operating system
Ubuntu
Browsers
Firefox
Browsers version
108
Relevant log output