Comments (10)
Thanks for the test!
How exactly do you reproduce this with Field Indexing?
from orchardcore.
Because this code will call the ToObject
function
from orchardcore.
I mean, how do you use Field Indexing that brings this bug out?
from orchardcore.
I mean, how do you use Field Indexing that brings this bug out?
I've created a recipe that, if you import it, you'll see detailed error messages in the logs, and I'm going to add it to the unit test
{
"name": "dynamicIndexTest",
"displayName": "dynamicIndexTests",
"description": "Test dynamicIndex",
"author": "Tony Han",
"website": "",
"version": "1.0.0",
"issetuprecipe": false,
"categories": [ "test" ],
"tags": [],
"steps": [
{
"name": "Feature",
"enable": [ "OrchardCore.ContentFields.Indexing.SQL" ]
},
{
"name": "ContentDefinition",
"ContentTypes": [
{
"Name": "Message",
"DisplayName": "Message",
"Settings": {
"ContentTypeSettings": {
"Creatable": true,
"Draftable": true,
"Versionable": true,
"Listable": true,
"Securable": true
}
},
"ContentTypePartDefinitionRecords": [
{
"PartName": "Message",
"Name": "Message",
"Settings": {
"ContentTypePartSettings": {
"Position": "5"
}
}
},
{
"PartName": "DIndexPart",
"Name": "DIndexPart"
}
]
}
],
"ContentParts": [
{
"Name": "Message",
"Settings": {},
"ContentPartFieldDefinitionRecords": [
{
"FieldName": "TextField",
"Name": "TextFieldTest"
},
{
"FieldName": "MultiTextField",
"Name": "MultiTextFieldTest"
},
{
"FieldName": "HtmlField",
"Name": "HtmlFieldTest"
},
{
"FieldName": "MediaField",
"Name": "MediaFieldTest"
},
{
"FieldName": "BooleanField",
"Name": "BooleanFieldTest"
},
{
"FieldName": "TimeField",
"Name": "TimeFieldTest"
},
{
"FieldName": "DateTimeField",
"Name": "DateTimeFieldTest"
},
{
"FieldName": "DateField",
"Name": "DateFieldTest"
},
{
"FieldName": "NumericField",
"Name": "NumericFieldTest"
},
{
"FieldName": "ContentPickerField",
"Name": "ContentPickerFieldTest"
},
{
"FieldName": "UserPickerField",
"Name": "UserPickerFieldTest"
}
]
}
]
},
{
"name": "content",
"data": [
{
"ContentItemId": "testId1",
"ContentType": "Message",
"DisplayText": "Message",
"Latest": true,
"Published": true,
"Owner": "[js: parameters('AdminUserId')]",
"Author": "[js: parameters('AdminUsername')]",
"Message": {
"TextFieldTest": { "Text": "TextFieldTestValue" },
"MultiTextFieldTest": { "Values": [ "MultiTextFieldValue1", "MultiTextFieldValue2" ] },
"HtmlFieldTest": { "Html": "HtmlFieldTestValue" },
"MediaFieldTest": { "Paths": [ "Path1", "Path2" ] },
"BooleanFieldTest": { "Value": true },
"TimeFieldTest": { "Value": "12:05" },
"DateTimeFieldTest": { "Value": "2024-5-5 22:50:58" },
"DateFieldTest": { "Value": "2024-5-5" },
"NumericFieldTest": { "Value": 123 },
"ContentPickerFieldTest": { "ContentItemIds": [ "testContentItemId" ] },
"UserPickerFieldTest": { "UserIds": [ "TestUserID" ] }
},
"TitlePart": {
"Title": "[locale en]You have successfully registered![/locale][locale fr]Vous vous êtes inscrit avec succès![/locale]"
}
}
]
}
]
}
from orchardcore.
STJ only supports 13:05:00
, but NSJ also supports 13:05
~~ Maybe it can't be considered as a bug.
from orchardcore.
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
from orchardcore.
Thanks for the details! All clear now.
Since this breaks existing installations that use TimeField
(right?), it's a bug. I suggest two things:
- Foremost, see if you can get STJ to deserialize this with some serializer settings. If yes, then all good.
- If not, or perhaps additionally, change
TimeField
to also save the seconds (as00
).
Please let me know once the PR is ready.
from orchardcore.
It looks like there is a similar problem with DateField
and DateTimeField
. It looks like there's more formatting requirements in STJ.
System.Text.Json.JsonException : The JSON value could not be converted to System.Nullable`1[System.DateTime]. Path: $.Value | LineNumber: 0 | BytePositionInLine: 26.
---- System.FormatException : The JSON value is not in a supported DateTime format.
from orchardcore.
So it's not related to SQL Indexing, right? It's just that indexing triggered the code path that was deserializing the document to a TimeField
, but this should be reproduced without it?
Could you share what JSON is saved with 1.8.3 (NSJ) in a document when using such fields? Just to confirm that it's NSJ that created this format, and that the DateTime format it used is also incompatible with STJ. This might be related to the culture when it saved the valus with NSJ.
from orchardcore.
@sebastienros Maybe this unit test can verify this
from orchardcore.
Related Issues (20)
- Elasticsearch configuration from recipe occasionally throws System.ObjectDisposedException during site setup HOT 7
- Unable to enable/disable workflow task from the workflow editor HOT 6
- Default content parts sort order should be base on the insertion position HOT 2
- Removing a shell does not remove it from the running shells table HOT 6
- Jalali date time in sitemap.xml HOT 3
- SqlQuery with 'return documents' has no results in liquid template HOT 3
- Renaming a query creates a copy HOT 1
- Module loading and unloading HOT 4
- Unable to remove taxonomy with nested terms HOT 1
- `depends-on` in script/style tag helpers don't cause the dependency to be included if it wasn't already HOT 1
- CreateContentTask evaluation will not remove illegal characters HOT 9
- Add a way to automatically add a part to a content type HOT 6
- Login Failed event fires twice if you attempt to sign in using invalid password for an existing user HOT 1
- move GetActionContextAsync and its related stuff to abstract place HOT 1
- Jean-Thierry Kéchichian Community Award 2024 - nominate exemplary community members here! HOT 1
- Allow field definitions come from other sources than content types in Azure Search AI
- Insufficient level of logging in ElasticSearch IndexingBackgroundTask
- workflow services registration extensions should be chainable
- Check if `OrchardCore.Layers.AdminController.Index(LayersIndexViewModel)` can be refactored HOT 3
- Changing code-scope to file-scope commit broke PRs HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orchardcore.