Page MenuHomePhabricator

Page Forms: If Special:CreateClass is used, existing properties get overwritten
Open, Needs TriagePublic

Description

If you create a new class using the special page CreateClass you can specify properties. That's good. It even is not a bad thing that you have to specify everything manually and can't pick existing properties. What's not good is that if you specify already existing properties these get overwritten. If I f.e. create a new class specifying 30 existing properties after the creation process I have to revert 30 properties to the second latest revision. The bug: If a property already exists it should be used not overwritten.

Event Timeline

RegisMay created this task.Nov 16 2018, 8:36 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 16 2018, 8:36 AM

Yes, Special:CreateClass overwrites everything. What do you think the logic should be - overwrite forms, templates and categories, but not properties?

I assume properties are reused often, not only in my use case here. Simple but very useful mechanisms would be:

Variant A)

  1. Property names get entered by the user. Nothing is changed here.
  2. During creation:
    • Ignore properties that already exist. Don't change them.
    • Don't overwrite templates, don't overwrite forms. It is plausible to assume that users creating forms and templates know about existing forms and templates. If they reuse identifiers it is likely an error and not intended by the user. The creation process could FAIL in that case and display an error page. (Or even more elegant: Return to step 1.)
  3. On success the information page is displayed to the user - quite similar as it is now - but it could give an overview which properties have been created/not created.

And an even more elegant variant B)

  1. Property names get entered by the user. A delay of 1 second is used (= JavaScript) to perform a query. If a name of a property is entered that is already used, disable the data type selection control. (Or even more elegant: Display an information message or an image indicating that the property is used again.)
  2. same as above
  3. same as above

Thanks for the interesting suggestions. At the very least, warning the user that certain pages are going to be overwritten is probably a good idea.