I can't save changes in type of object in version 1.6.6

Hello,
In new version when I tried edit a field and save i got communicate
“Error
[object Object]”
and I can’t save anything.

When I tried export to json this type which I tried modify and clicked GO! then there isn’t any actions.
I didn’t get any file.

When I downgrade to version 1.6.4 problems disappeard.

Please fix these problems

Hello @marcinw ,

unfortunately I can’t recreate the behavior. It may be that the types were created incorrectly before and the new schema validation for the type does not allow the structure anymore. Can you possibly describe in more detail what you did.

Validation scheme you can find here :

https://docs.datagerry.com/1.6.6/api/rest/framework.html#id2

With kind regards

Hello,
How could be created incorrectly?
Always datagerry system should verify types in every version, and repair if something wrong or should indicate where is problem.

I go back to newest version 1.6.6 and again I tried edit some types.
When i checked reference fields i don’t had in these fields in parameters: Reference type Selections. These fields was empty.
After fill these paremeters and after clicked save button i got communicates

image

and after that, something even stranger happened. Every field was inaccessible. It had no name, you couldn’t expand it, and you couldn’t do anything on the fields.

I checked on 5 different types of objects and the situation is similar.

.
.
.
.

P.S.
I think the problem may be that when upgrading the version it loses parameter information in the object types in the case of reference fields.
I think so, because when I completed the “Reference type Selections” parameter in each reference field with the appropriate object references, I was able to save the changes.

Please take a closer look at this situation

Hi,
Please look:


this type was create in last year and by program never edited by anyone.

.
.

This is view from edit one object in this type


and could change:
image

next

i have in this type reference fields:
image

when i look to any of these fields i see empty parameter “Reference type Selections”

Hi @marcinw,

found the cause. The older types had at that time as reference value only an integer value. But it developed to a list to be able to refer to different types. But I have adjusted the validation and this now blocks the older types (It is programatically always checked whether it is a list or a single value. Therefore all objects of this type can be administered furthermore. But the schema validation accesses it earlier and blocks). Working with objects of this type is still possible, but the error occurs when editing the type. Quick solution would be to export the type. Change the desired value to a list and import it again.

{
	"description": "The browser (or proxy) sent a request that this server could not understand.",
	"joke": "... cause the access was nuts!",
	"message": {
		"validation_error": {
			"fields": [
				{
					"1": [
						{
							"ref_types": [
								"must be of list type"
							]
						}
					],
					"2": [
						{
							"ref_types": [
								"must be of list type"
							]
						}
					]
				}
			]
		}
	},
	"response": "Bad Request: http://localhost/rest/types/17",
	"status": 400
}

Bugfix will come early next week

1 Like

Hello @sergej.dumler ,
Was the bugfix released with 1.6.7 as you wrote?

Hello @marcinw, yes, that is it.