You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When activating the setting to enable the attribute table, the Hajk client crashes (becomes completely white) when clicking on the attribute table button if the layer contains a dateTime/date field, for instance Date in Oracle or timestamp in PostgreSQL.
The dateTime/date field seems to look something like this in the response from QGIS Server:
I have tried altering the settings below for the layer in QGIS, but to no effect on the attribute table working or not. MUI seems to only accept Date() objects after all. Perhaps valueGetter can be used to convert the dateTime/date strings somehow? Link to MUI docs
To Reproduce
Activate the functionality in Admin for a layer containing any number of dateTime fields. Click on the attribute table icon.
The following type of error will display:
ERROR MUI: datecolumn type only acceptsDateobjects as values. UsevalueGetterto transform the value into aDateobject. Row ID: 0, field: "DATUM". Error: MUI:datecolumn type only acceptsDateobjects as values. UsevalueGetterto transform the value into aDate object. Row ID: 0, field: "DATUM". at throwIfNotDateObject (http://localhost:3000/static/js/bundle.js:67040:11) at Object.gridDateFormatter [as valueFormatter] (http://localhost:3000/static/js/bundle.js:67052:3) at Object.getCellParams (http://localhost:3000/static/js/bundle.js:87296:38) at http://localhost:3000/static/js/bundle.js:70224:41 at applySelector (http://localhost:3000/static/js/bundle.js:90112:10) at useGridSelector (http://localhost:3000/static/js/bundle.js:90132:20) at http://localhost:3000/static/js/bundle.js:70219:107 at renderWithHooks (http://localhost:3000/static/js/bundle.js:151795:22) at updateForwardRef (http://localhost:3000/static/js/bundle.js:154364:24) at beginWork (http://localhost:3000/static/js/bundle.js:156411:20)
Expected behavior
The attribute table shows up as expected.
Additional context
Tested using Oracle and PostgreSQL. Using QGIS/QGIS Server 3.34. I have not tested it with for instance Geoserver. Hajk version 3.14 RC1.
The text was updated successfully, but these errors were encountered:
eri-blan
changed the title
LayerSwitcher: Attribute table seems to crash whenever the layer contains a dateTime field using QGIS Server
LayerSwitcher: Attribute table seems to crash whenever the layer contains a date/dateTime field using QGIS Server
Aug 21, 2024
eri-blan
changed the title
LayerSwitcher: Attribute table seems to crash whenever the layer contains a date/dateTime field using QGIS Server
LayerSwitcher: Using attribute table seems to crash Hajk whenever the layer contains a date/dateTime field using QGIS Server
Aug 21, 2024
Hi @eri-blan. The clear description you provide got me thinking and I think the solution could be as simple as adding rows 631-633, as in the screenshot below:
Describe the bug
When activating the setting to enable the attribute table, the Hajk client crashes (becomes completely white) when clicking on the attribute table button if the layer contains a dateTime/date field, for instance Date in Oracle or timestamp in PostgreSQL.
The dateTime/date field seems to look something like this in the response from QGIS Server:
(GetFeature)
"DATUM": "2022-04-28T00:00:00.000"
(DescribeFeatureType)
I have tried altering the settings below for the layer in QGIS, but to no effect on the attribute table working or not. MUI seems to only accept Date() objects after all. Perhaps valueGetter can be used to convert the dateTime/date strings somehow?
Link to MUI docs
To Reproduce
Activate the functionality in Admin for a layer containing any number of dateTime fields. Click on the attribute table icon.
The following type of error will display:
ERROR MUI:
datecolumn type only accepts
Dateobjects as values. Use
valueGetterto transform the value into a
Dateobject. Row ID: 0, field: "DATUM". Error: MUI:
datecolumn type only accepts
Dateobjects as values. Use
valueGetterto transform the value into a
Dateobject. Row ID: 0, field: "DATUM". at throwIfNotDateObject (http://localhost:3000/static/js/bundle.js:67040:11) at Object.gridDateFormatter [as valueFormatter] (http://localhost:3000/static/js/bundle.js:67052:3) at Object.getCellParams (http://localhost:3000/static/js/bundle.js:87296:38) at http://localhost:3000/static/js/bundle.js:70224:41 at applySelector (http://localhost:3000/static/js/bundle.js:90112:10) at useGridSelector (http://localhost:3000/static/js/bundle.js:90132:20) at http://localhost:3000/static/js/bundle.js:70219:107 at renderWithHooks (http://localhost:3000/static/js/bundle.js:151795:22) at updateForwardRef (http://localhost:3000/static/js/bundle.js:154364:24) at beginWork (http://localhost:3000/static/js/bundle.js:156411:20)
Expected behavior
The attribute table shows up as expected.
Additional context
Tested using Oracle and PostgreSQL. Using QGIS/QGIS Server 3.34. I have not tested it with for instance Geoserver. Hajk version 3.14 RC1.
The text was updated successfully, but these errors were encountered: