Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback about a Wikidata item: Does not exist, Is at other location, other problem #2425

Closed
nicolas-raoul opened this issue Feb 7, 2019 · 40 comments · Fixed by #5740
Closed
Assignees
Labels

Comments

@nicolas-raoul
Copy link
Member

I suggest adding a "discussion" action to the bottom panel that opens when you select a pin in the "Nearby" activity:

adb-screenshot

It would open an activity that could look like this:

Write something about the "GS1 Japan" item. It will be publicly visible.
☐ "GS1 Japan" does not exist anymore, no picture can ever be taken of it.
☑ "GS1 Japan" is at a different place (please specify the correct place below, if possible tell us the correct latitude/longitude).
☐ Other problem or information (please explain below).
--------------------------------------------------------------
| It has moved to across the street blabla.                  |
|                                                            |
--------------------------------------------------------------
                                                  |Send|
Current talk page:
blablabla
blablabla

The edit should be made with a particular edit tag, so that we can keep track of this feedback and impact the changes:

  • Add the "closed" property to items that do not exist anymore
  • Modify the latitude/longitude of items that are at a different place
    I volunteer to do that work, as I expect the workload to be bearable.

Implementing this would also solve issue #965.

Phase 2 (only after the feature above is implemented): Allow users to write a memo about the item even when offline. This would allow off-the-grid photographers with a DSLR to write down a picture filename, and later match it when they get back home.

@vanshikaarora
Copy link
Collaborator

That sounds like a good idea @nicolas-raoul. There were few points in my mind
How are we going to utilise the memo added by a user?
Is it like clicking on the pin will give us the details added by all the user's with a feature to add your a memo from the user's side?

@nicolas-raoul
Copy link
Member Author

@vanshikaarora Yes, added notes will be visible by all.
I forgot to say the the phase 1 notes should be added to the item's talk page.
For example, here is the talk page of the item "SQUARE BUILDING", a building which has been demolished in 2007: https://www.wikidata.org/wiki/Talk:Q11311478

== Does not exist anymore ==
"SQUARE BUILDING" does not exist anymore, no picture can ever be taken of it.
~~~~

@vanshikaarora
Copy link
Collaborator

Just one more question, please.
These notes will be verified by us wikimedia(for relevance) before publishing or all of them would be published?

@nicolas-raoul
Copy link
Member Author

They can be published immediately :-)
In the wiki world, we assume good will, and let anyone edit stuff. Especially talk pages.

By the way, I see what you mean by "us wikimedia", but I just want to mention that even though our app is an official Wikimedia Foundation (WMF) app, only very few of us (only Vojtech I think) are members of the Wikimedia Foundation, and we historically considered the app to be an independent effort, so we don't speak in the name of Wikimedia.

@misaochan
Copy link
Member

Hmmm, I am not sure about this. The bottom panel is already quite full, adding one more item seems to make it quite cluttered. I guess the main reason why I am hesitant is that having this extra item seems to only save the user 1 tap. Since they can just go to the Wikidata item and then tap the "Discussion" tab in their browser. Granted, wiki editing in the mobile browser is a bit clunky.

Maybe we could consider a different way to implement this action in the UI. For instance, a small/discreet "Report error" text button somewhere?

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Feb 10, 2019 via email

@misaochan
Copy link
Member

Removing inactive icons would be fantastic. :) Haven't tried the Photo Editor app yet.

@vanshikaarora
Copy link
Collaborator

And removing the inactive icons rather than greying them out.

That sounds like a great idea. I can work on this

@misaochan
Copy link
Member

Thanks @vanshikaarora ! I think we don't have a separate issue for that yet, would you mind creating the issue (and stating that you are going to work on it in your post)?

@vanshikaarora
Copy link
Collaborator

Thanks @vanshikaarora ! I think we don't have a separate issue for that yet, would you mind creating the issue (and stating that you are going to work on it in your post)?

Sure I'll do that :)

@vanshikaarora
Copy link
Collaborator

vanshikaarora commented Mar 13, 2019

The edit should be made with a particular edit tag, so that we can keep track of this feedback and impact the changes:
Add the "closed" property to items that do not exist anymore
Modify the latitude/longitude of items that are at a different place
I volunteer to do that work, as I expect the workload to be bearable.

@nicolas-raoul I am ready to work on this Issue. But before I begin I would like to know how are retrieving/sending these feedback's. Is there an API for it?

@nicolas-raoul
Copy link
Member Author

@vanshikaarora Thanks!

As you have see, you will need to read and write to a Wikidata item's talk page such as https://www.wikidata.org/wiki/Talk:Q11311478
Yes, there is an API.
For the read part, actually something rather similar is being implemented right now for media talk pages:
https://github.com/commons-app/apps-android-commons/compare/master...sp2710:fix%231850?expand=1#diff-22835e29a24ad4eec8642964effa110cR76
I suspect the API for Wikidata item talk pages is very similar.

@vanshikaarora
Copy link
Collaborator

@nicolas-raoul I have gone through the API's available here. And I have found that we can create a new description entity for each of these talks. Here was an API that I have found useful.

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Mar 14, 2019

"description" is a different thing, we should not edit it.

We must use edit with title being "Talk:" + the item QID

@nicolas-raoul
Copy link
Member Author

To display the current content of the talk page, https://commons.wikimedia.org/w/api.php?action=help&modules=flow-parsoid-utils (also with title being "Talk:" + the item QID) seems like a good solution.

@vanshikaarora
Copy link
Collaborator

vanshikaarora commented Mar 14, 2019

To display the current content of the talk page, https://commons.wikimedia.org/w/api.php?action=help&modules=flow-parsoid-utils (also with title being "Talk:" + the item QID) seems like a good solution.

Ok I'll use this API @nicolas-raoul

Here is the work-list for me. That will be available in the next PR:

  • Calling this API from ApacheHttpClientMediaWikiApi.java
  • Adding an Icon in the bottom panel for talks
  • Creating a new Activity for reading talks
  • Deciding the best UI for the activity

Is there anything that you would like to add or suggest especially the UI part?

@nicolas-raoul
Copy link
Member Author

Writing down this work-list is a great initiative!

The content sounds good, for the API I think we have 3 use cases:

@vanshikaarora
Copy link
Collaborator

Append content to a talk page that already has some content

@nicolas-raoul Is this available currently?

@nicolas-raoul
Copy link
Member Author

I don't think so, you will probably have to read the content from the server, then concatenate, then send to the server 🙂

@vanshikaarora
Copy link
Collaborator

@nicolas-raoul I have parsed the API using

public String readFeedback(String source) throws IOException {
        public String readFeedback(String source) throws IOException {
        return api.action("flow-parsoid-utils")
                .param("from", "html")
                .param("to", "wikitext")
                .param("content", source)
                .param("title", "Talk")
                .get()
                .getString("/api/flow-parsoid-utils/@content");
    }
    }

And got the following response

Indian Institute of Technology (Indian School of Mines), Dhanbad

Currently the source passed as a parameter is returned as a response.

Is this intended?

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Mar 15, 2019

You can get the wikitext of the talk page like this:

https://www.wikidata.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=Talk:Q11311478

Then either just display it like this (easiest), or put as as the source of your request above (and replace Talk with Talk:Q11311478

@vanshikaarora
Copy link
Collaborator

Then either just display it like this (easiest)

@nicolas-raoul Do you mean using a WebView here?

@vanshikaarora
Copy link
Collaborator

@nicolas-raoul The above link gives a query like

"query": {
        "pages": {
            "61503095": {
                "pageid": 61503095,
                "ns": 1,
                "title": "Talk:Q11311478",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "== Does not exist anymore ==\n\"SQUARE BUILDING\" does not exist anymore, no picture can ever be taken of it.\n\n[[User:Syced|Syced]] ([[User talk:Syced|<span class=\"signature-talk\">{{int:Talkpagelinktext}}</span>]]) 15:02, 9 February 2019 (UTC)"
                    }
                ]
            }
        }
    }

While I was executing the API there wasn't any node like "revisions" instead the API response looked like

<?xml version="1.0" encoding="UTF-8"?><api batchcomplete=""><query><pages><page _idx="-1" ns="1" title="Talk:Q11311478" missing=""/></pages></query></api>

Intsead of "revisions" it returned an empty node "missing". Am I parsing the API correctly here?

api.action("query")
        .param("prop", "revisions")
        .param("rvprop", "content")
        .param("titles", "Talk:Q11311478")
        .get().getNode("api/query/pages/page/@missing");

@nicolas-raoul
Copy link
Member Author

What do you get with

api.action("query")
        .param("prop", "revisions")
        .param("rvprop", "content")
        .param("titles", "Talk:Q11311478")
        .get();

?

@vanshikaarora
Copy link
Collaborator

@nicolas-raoul It returns an object of type CustomApiResult

@nicolas-raoul
Copy link
Member Author

Does your IDE allow you to see what is inside this object?

@maskaravivek
Copy link
Member

What do you get with

api.action("query")
        .param("prop", "revisions")
        .param("rvprop", "content")
        .param("titles", "Talk:Q11311478")
        .get();

?

When I tried calling this API I got the following response:

https://www.wikidata.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=Talk:Q11311478&format=json&rvslots=main

{
  "batchcomplete": "",
  "query": {
    "pages": {
      "61503095": {
        "pageid": 61503095,
        "ns": 1,
        "title": "Talk:Q11311478",
        "revisions": [
          {
            "slots": {
              "main": {
                "contentmodel": "wikitext",
                "contentformat": "text/x-wiki",
                "*": "== Does not exist anymore ==\n\"SQUARE BUILDING\" does not exist anymore, no picture can ever be taken of it.\n\n[[User:Syced|Syced]] ([[User talk:Syced|<span class=\"signature-talk\">{{int:Talkpagelinktext}}</span>]]) 15:02, 9 February 2019 (UTC)"
              }
            }
          }
        ]
      }
    }
  }
}

@vanshikaarora
Copy link
Collaborator

@maskaravivek on using

api.action("query")
        .param("prop", "revisions")
        .param("rvprop", "content")
        .param("titles", "Talk:Q11311478")
        .get();

The following is shown in logs

<?xml version="1.0" encoding="UTF-8"?><api batchcomplete=""><query><pages><page _idx="-1" ns="1" title="Talk:Q11311478" missing=""/></pages></query></api>

@maskaravivek
Copy link
Member

I also used the rvslots param set to main

@vanshikaarora
Copy link
Collaborator

I also used the rvslots param set to main

@maskaravivek Even then the response was same for me :(

@maskaravivek
Copy link
Member

@maskaravivek on using

api.action("query")
        .param("prop", "revisions")
        .param("rvprop", "content")
        .param("titles", "Talk:Q11311478")
        .get();

You need to use wikidataApi instead of api

@vanshikaarora
Copy link
Collaborator

Thanks @maskaravivek Using this I successfully got the result :)

wikidataApi.action("query")
                .param("prop", "revisions")
                .param("rvprop", "content")
                .param("rvslots","main")
                .param("titles", "Talk:Q11311478")
                .get().getString("api")

@nicolas-raoul
Copy link
Member Author

About the UI: How about the one I proposed in the first post above? It does not need to be polished as it is not a place people will see often :-)

@nicolas-raoul nicolas-raoul changed the title Feedback about a Wikidata item Feedback about a Wikidata item: Does not exist, Is at other location, Etc Aug 6, 2022
@shashankiitbhu
Copy link
Contributor

Hi @nicolas-raoul I would like to work on this task, can you assign this to me

@nicolas-raoul nicolas-raoul changed the title Feedback about a Wikidata item: Does not exist, Is at other location, Etc Feedback about a Wikidata item: Does not exist, Is at other location, other problem Mar 28, 2024
@kanahia1
Copy link
Contributor

Hello @nicolas-raoul, Can I also start working over this one ?

@nicolas-raoul
Copy link
Member Author

@kanahia1 Sure, if you want, thanks! 🙂

@kanahia1
Copy link
Contributor

Hey everyone I was working with API to edit/create page. Each time I used to do a request to edit/create page I receive an error.

{"error":{"code":"badtoken","info":"Invalid CSRF token.","*":"See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt; for notice of API deprecations and breaking changes."},"servedby":"mw-api-ext.eqiad.main-6549748955-888mz"}

I used CSRFTokenClient for getting a token, here's an token for example 96edc6ad015770382d9a24bbc4312ed9664c4d98+\

@nicolas-raoul
Copy link
Member Author

I remember seeing such an issue in the past, you may want to search among closed issues.

@kanahia1
Copy link
Contributor

Sure and Thanks :-)

@kanahia1
Copy link
Contributor

I tried logging in/out as suggested #2340 (comment) but not worked. Will look more into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
7 participants