dokuwiki-plugin-struct icon indicating copy to clipboard operation
dokuwiki-plugin-struct copied to clipboard

SchemaEditor new fields get created for unknown reason

Open splitbrain opened this issue 9 years ago • 2 comments

It seems sometimes fields get duplicated for some reason when editing a schema. A warning about the field being duplicate is show and the field is renamed.

It's unclear to me when this happens and how to reproduce it.

As an immeadiate remedy we could simply ignore duplicate fields instead of renaming them.

splitbrain avatar Mar 17 '16 14:03 splitbrain

some first pointers. When adding a new field, then reloading the page a couple of times, the new field duplicates as an disabled field. No duplication warning is shown. This actually creates an invalid schema state. Once the schema is saved, the duplicate fields are renamed.

The post data is always the same, containing only the old fields and the one new field.

Duplication probably happens because the old schema is loaded and only updated with the post data.

splitbrain avatar Mar 17 '16 16:03 splitbrain

IMO There should be an error message when a new field cannot be created because the name is already taken. A background rename with a digit suffix (field -> field1) is not a workable solution.

annda avatar Nov 14 '23 20:11 annda