Page MenuHomePhabricator

Moving a Lexeme page should not be possible
Closed, ResolvedPublic3 Story Points

Description

Acceptance criteria

  • A user can not move Lexeme page

Scenarios

Scenario: No button on page

GIVEN I am logged in
WHEN I am on the Lexeme page
THEN there is no "Move" button in the navigation menu

Scenario: Deep-link protected

GIVEN the lexeme page exists
WHEN I give the page title as a parameter to Special:MovePage page
THEN I get the error message: You do not have permission to move this page, for the following reason: Cannot move pages in namespace "Lexeme".

For reference, the error happening when trying to move the item page

Scenario: API protected

GIVEN the lexeme page exists
WHEN I use API action=move to move it
THEN I get the error message

For reference this is what the API currently returns when trying to move an item:

https://test.wikidata.org/wiki/Special:ApiSandbox#action=move&format=json&from=Q123&to=Q29874184421&token=b8b4459e04b2cd62559f7f504e5356925aa7a796%2B%5C :

{
    "error": {
        "code": "immobile-source-namespace",
        "info": "Cannot move pages in namespace \"\".",
        "*": "See https://test.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "mw1340"
}

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseLexeme : masterAdd test checking the moveability of Lexeme namespaces

Event Timeline

WMDE-leszek triaged this task as Normal priority.Mar 12 2018, 1:22 PM
WMDE-leszek created this task.
WMDE-leszek updated the task description. (Show Details)Mar 12 2018, 3:31 PM
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek updated the task description. (Show Details)Mar 12 2018, 3:37 PM
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek updated the task description. (Show Details)Mar 12 2018, 3:44 PM
Pablo-WMDE updated the task description. (Show Details)Mar 12 2018, 4:11 PM
Pablo-WMDE updated the task description. (Show Details)Mar 12 2018, 4:13 PM
WMDE-leszek updated the task description. (Show Details)Mar 12 2018, 4:28 PM
Addshore updated the task description. (Show Details)Mar 13 2018, 10:33 AM
WMDE-leszek updated the task description. (Show Details)Mar 13 2018, 11:41 AM
WMDE-leszek set the point value for this task to 3.
Pablo-WMDE added a subscriber: Pablo-WMDE.EditedMar 28 2018, 11:42 AM

req

action:move
format:json
from:Lexeme:L2
to:Lexeme:L4711
token:...
{
    "error": {
        "code": "immobile-source-namespace",
        "info": "Cannot move pages in namespace \"Lexeme\".",
        "*": "See http://default.web.mw.localhost:8087/mediawiki/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "1b015798e086"
}

Is that good enough?

Addshore claimed this task.Apr 5 2018, 8:51 AM
Addshore moved this task from To Do to Doing on the Wikidata-Turtles-18.03.28 board.
Addshore added a subscriber: Addshore.

req

action:move
format:json
from:Lexeme:L2
to:Lexeme:L4711
token:...
{
    "error": {
        "code": "immobile-source-namespace",
        "info": "Cannot move pages in namespace \"Lexeme\".",
        "*": "See http://default.web.mw.localhost:8087/mediawiki/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "1b015798e086"
}

Is that good enough?

Looks good to me, I can try and write a test or 2

Restricted Application added a project: User-Addshore. · View Herald TranscriptApr 5 2018, 8:51 AM

Change 424264 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Add test checking the moveability of Lexeme namespaces

https://gerrit.wikimedia.org/r/424264

I'm going to move this to peer review with this single simple test added.

I'm open to adding more tests, but I would argue that this functionality is / should be tested in core.
Right now core appears to do this for MovePage (in the form of MovePageTest) and it does check for the immobile-source-namespace.
The api (ApiMove) currently wraps MovePage, as does SpecialMovepage.

Addshore moved this task from Back Burner 🏛️ to Active 🚁 on the User-Addshore board.

Change 424264 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add test checking the moveability of Lexeme namespaces

https://gerrit.wikimedia.org/r/424264

Lydia_Pintscher closed this task as Resolved.Apr 6 2018, 9:29 AM

Yay :)