Page MenuHomePhabricator

Special:NewItem redirects to after clicking "create" following a "already exists" message
Closed, DuplicatePublic



  2. put some values for label and descriptions that already exists, like English language, label:Auto, description:company (it's
  3. click "create" and you'll get "Item Q4826088 already has label "Auto" associated with language code en, using the same description text. "
  4. then click again "create" and you're forwarded to

Event Timeline

Stryn created this task.Oct 3 2015, 7:30 PM
Stryn raised the priority of this task from to Needs Triage.
Stryn updated the task description. (Show Details)
Stryn added a project: Wikidata.
Stryn added a subscriber: Stryn.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 3 2015, 7:30 PM

Still happening, what is needed to fix this?

Volker_E removed a project: OOUI.Jan 4 2017, 3:06 AM

I have just done a quick investigation: after submitting the form according to the steps, the HTML source contains <form action="/wiki/NewItem"> instead of <form action="/wiki/Special:NewItem"> (which is there when you open an empty for). If I fix the source code and try to submit, it behaves correctly.

The action attribute comes from HTMLForm::getAction() which calls $this->getTitle()->getLocalURL(). So there is some problem with the title.

A quick solution could be like:

// SpecialNewEntity::createForm
 * @return HTMLForm
private function createForm() {
  return HTMLForm::factory( 'ooui', $this->getFormFields(), $this->getContext() )
    ->setTitle( SpecialPage::getTitleFor( $this->getName() ) )
  // ...

However, this fixes the reported problem but not the actual problem.

abian added a subscriber: abian.Feb 11 2018, 7:26 PM
abian added a comment.Feb 11 2018, 8:00 PM

Still happening. I share with you a debug file documenting this issue in a fresh installation. I hope it can be helpful.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptApr 12 2018, 7:42 AM