https://bugzilla.wikimedia.org/show_bug.cgi?id=38843

       Web browser: ---
             Bug #: 38843
           Summary: Refine behavior of the wbsetitem API module
           Product: MediaWiki extensions
           Version: master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: WikidataRepo
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


The wbsetitem module seems to be underspecified and exhibits surprising
behavior in some cases:

Labels, descriptions and aliases are given per language. For each language
given, the labels, descriptions or list of aliases is set, replacing any
previous value. If set to an empty value, the respective entry is removed.
Language versions of labels, descriptions and aliases that are not present in
the posted data structure remain untouched. 

That is, it is not possible to completely replace the data of an item without
specifying all values for all possible languages. It would be nice to have a
flag for "strip other languages" or some such. Maybe that should even be the
default.

For Sitelinks, the situation is similar but not quite the same: Site links are
set for the sites that are given in the posted data set, links to other sites
remain unchanged. Again, it would be nice to have a way to strip links to all
sites not specified in the present call to wbsetitem.

But there's one major inconsistency: From looking at the code, it seems that
setting the sitelink for a specific site to an empty string does not remove
that sitelink, but causes an error. It would be nice if this would change, so
the behavior for sitelinks is consistent with how setting of
labels/descriptions/aliases work.

For aliases, it might also be nice to have a mode where the new aliases are
just added to the existing list - but then, maybe not.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to