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)
- liquid script tag does not render custom attributes HOT 19
- OrchardCore.Twitter breaks workflow editor HOT 7
- Allow users to enter custom list of items for each content item HOT 4
- Migrations can stuck in a failing state after an import enables multiple features HOT 1
- FE theme dlls missing in custom bin folder in release build HOT 3
- Can't deserialize LocalizedString and LocalizedHtmlString out of the box HOT 21
- Trumbowyg editor modals display in light mode while dark mode is active HOT 5
- .net8+orchardcore blazorserver mode render component error HOT 10
- liquid jsonparse is stricter compared to oc 1.7 HOT 2
- Error when disabling Lucine or elastic search feature HOT 7
- Lucene.Net.QueryParsers.Classic.ParseException HOT 2
- Shell blueprint is missing dependencies HOT 3
- Support HTML in Markdown by default HOT 1
- Rebuilding Lucene Index fails HOT 3
- Orchard corrupts Elastic stemmer configuration HOT 5
- Testing webapi with openId HOT 1
- Monthly community metrics report for 2024-06-01..2024-06-30 HOT 1
- Style blockquote in markdown editor preview
- Turkish Characters in URL Slug HOT 12
- The non-debug versions of certain static resources aren't loaded when Resource Debug Mode is set to Enabled HOT 3
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.