Cannot add categories to Commons Datasets
Closed, DuplicatePublic

Description

When adding a category to a Commons Dataset (for instance this one), the following error message appears:

You cannot edit this revision because its content model is Tabular.JsonConfig, which differs from the current content model of the page wikitext.

Without categorization it becomes hard to organize datasets in the existing model in Commons.

Micru created this task.Dec 23 2016, 1:08 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 23 2016, 1:08 AM
Dereckson added a subscriber: Dereckson.EditedDec 23 2016, 2:19 AM

@Micru please explain what do you mean by "adding a category".

Did you try to add manually [[Category:Foo]] (or through HotCats) at the bottom of the page?

If so, this is a probably a good message: the page expects a JSON format, not wikitext.

Yurik triaged this task as High priority.Dec 23 2016, 2:24 AM
Yurik added a project: Maps-Sprint.

Thanks @Micru! This is actually several different issues:

  • The category picker UI shown at the bottom of the page does not handle non-wiki pages properly (it attempts to change the page from JSON into Wikimarkup
  • There is no structured way to add categories
  • "sources", the only wiki markup field in the json, hides the [[category:...]] text as it is suppose to, but does not record it in the database. See example.
Micru added a comment.Dec 23 2016, 9:35 AM

@Dereckson Yes, I was using HotCats at the bottom of the page.

Yurik added a comment.Dec 23 2016, 9:49 AM

As a temporary workaround, we could add categories to the talk pages? I know its not perfect, and hopefully we will have this fixed right after New Years' holidays.

@Yurik What about using a wiki page to store categories and metadata about the dataset and then the dataset itself in a subpage. Would it work?

@Micru no, the Data: namespace is special - it only allows special page types. There is no subpages there, or any wiki pages for that matter, only the .map and .tab pages. Hence the talk page is the closest one at the moment :(

@Yurik it is a pity that the namespace cannot be associated with another page (T487 comes to mind).

For some reason I thought that the situation would be similar to Wikidata for Commons, see:
https://commons.wikimedia.org/wiki/Commons_talk:Structured_data#It.27s_alive.21

There is a main page with the file, metadata, usage history, categories, etc. and then the structured data page proper.
http://structured-commons.wmflabs.org/wiki/File:LighthouseinDublin.jpg
http://structured-commons.wmflabs.org/wiki/MediaInfo:M13

Although in this case there is no file, it might be useful to have a page where metadata, provenance, categories, and maintenance templates can be placed. Even some visualizations of the data, in that case it could have another namespace, like Visualization:.

What do you think?

The implementation of T155290 will solve this problem as well, so I'm merging these tasks together.