Page MenuHomePhabricator

Fatal error on action=edit for Index-namespace redirect: "EditIndexPage is only able to display a form for IndexContent"
Open, Needs TriagePublicPRODUCTION ERROR

Event Timeline

Candalua subscribed.
exception.file: /srv/mediawiki/php-1.32.0-wmf.3/extensions/ProofreadPage/includes/Index/EditIndexPage.php:60
exception.message:	EditIndexPage is only able to display a form for IndexContent
exception.trace:
#0 /srv/mediawiki/php-1.32.0-wmf.3/includes/EditPage.php(2866): ProofreadPage\Index\EditIndexPage->showContentForm()
#1 /srv/mediawiki/php-1.32.0-wmf.3/includes/EditPage.php(664): EditPage->showEditForm()
#2 /srv/mediawiki/php-1.32.0-wmf.3/extensions/ProofreadPage/includes/Index/IndexEditAction.php(19): EditPage->edit()
#3 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(500): ProofreadPage\Index\IndexEditAction->show()
#4 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#5 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(861): MediaWiki->performRequest()
#6 /srv/mediawiki/php-1.32.0-wmf.3/includes/MediaWiki.php(524): MediaWiki->main()
#7 /srv/mediawiki/php-1.32.0-wmf.3/index.php(42): MediaWiki->run()
#8 /srv/mediawiki/w/index.php(3): include(string)
#9 {main}
exception_url:   	/w/index.php?title=Index:First_Lessons_in_the_Tie-chiw_Dialect.djvu&action=edit
Aklapper renamed this task from Trying to edit an Index-namespace redirect results in a "Fatal exception of type 'MWException'" to Trying to edit an Index-namespace redirect results in fatal error: "EditIndexPage is only able to display a form for IndexContent".May 17 2018, 3:33 PM
Krinkle subscribed.

Tagging VisualEditor (Editing-team) per "ProofreadPage" on mw:Maintainers. I haven't looked into the fatal or how to reproduce it exactly, but I'd start in Logstash/mediawiki-errors and look for +message:EditIndexPage in last 7 days for recent example urls and stacktraces.

Krinkle renamed this task from Trying to edit an Index-namespace redirect results in fatal error: "EditIndexPage is only able to display a form for IndexContent" to Fatal error on aciton=edit for Index-namespace redirect: "EditIndexPage is only able to display a form for IndexContent".Aug 29 2018, 8:19 PM
Krinkle renamed this task from Fatal error on aciton=edit for Index-namespace redirect: "EditIndexPage is only able to display a form for IndexContent" to Fatal error on action=edit for Index-namespace redirect: "EditIndexPage is only able to display a form for IndexContent".
Krinkle raised the priority of this task from Low to Needs Triage.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM

Ran into a few more of these today:

Error
normalized_message
[{reqId}] {exception_url}   MWException: EditIndexPage is only able to display a form for IndexContent
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.7/extensions/ProofreadPage/includes/Index/EditIndexPage.php(68)
#0 /srv/mediawiki/php-1.38.0-wmf.7/includes/EditPage.php(3121): ProofreadPage\Index\EditIndexPage->showContentForm()
#1 /srv/mediawiki/php-1.38.0-wmf.7/includes/EditPage.php(723): EditPage->showEditForm()
#2 /srv/mediawiki/php-1.38.0-wmf.7/extensions/ProofreadPage/includes/Index/IndexEditAction.php(20): EditPage->edit()
#3 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(538): ProofreadPage\Index\IndexEditAction->show()
#4 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#5 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(925): MediaWiki->performRequest()
#6 /srv/mediawiki/php-1.38.0-wmf.7/includes/MediaWiki.php(559): MediaWiki->main()
#7 /srv/mediawiki/php-1.38.0-wmf.7/index.php(53): MediaWiki->run()
#8 /srv/mediawiki/php-1.38.0-wmf.7/index.php(46): wfIndexMain()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}

We don't appear to be defining any interface for editing Index: namespace redirects, which is probably what this is about

I was not aware that Book index content model from PRP supported redirects but if it does they should definitely work properly. I wonder what happens when one attempts to rename/move one of these redirects.

They should support it then, or remove the "move" button on Index namespace.

The problem is not the redirecting mechanism itself, which is working fine, but when we try to go to the original page (redirect=no), and try to edit, the error occur.

I wasn't aware of this bug until some Wikisourcian try to edit the original index page, and the result occurred. Then I searched all redirected index in both wikisource, and found out that it was indeed because of the redirect.

They should support it then, or remove the "move" button on Index namespace.

Actually it makes sense to have the Move button: the Index must have the same name as the underlying file, and if the file is moved (because of typos in the name, or any other reasons) then the Index must also be moved. And it still makes some sense to keep a redirect, in case some page was pointing to the old name (although I prefer to just delete the redirect and fix the links).

Then if you really need to edit that redirect, you just have to change the content model to "wikitext".

So I believe that we should just fix the error message here, to reflect the fact that the content model is wrong and you need to change it before you try to edit the page.

They should support it then, or remove the "move" button on Index namespace.

Actually it makes sense to have the Move button: the Index must have the same name as the underlying file, and if the file is moved (because of typos in the name, or any other reasons) then the Index must also be moved. And it still makes some sense to keep a redirect, in case some page was pointing to the old name (although I prefer to just delete the redirect and fix the links).

Then if you really need to edit that redirect, you just have to change the content model to "wikitext".

So I believe that we should just fix the error message here, to reflect the fact that the content model is wrong and you need to change it before you try to edit the page.

In case of fixing double redirect, I have to change the content model first of the original redirect?

But in one instance, a bot was able to fix a double redirect, why human cannot?

image.png (424×1 px, 65 KB)

https://id.wikisource.org/w/index.php?title=Indeks:Boekoe_Tjerita_Graaf_de_Monte_Christo_-_10&action=history

In case of fixing double redirect, I have to change the content model first of the original redirect?

You need the change the content model of the page you're trying to edit.

But in one instance, a bot was able to fix a double redirect, why human cannot?

Bots can operate directly on the page's content, they don't need to go through a user interface. It is not impossible to edit the page, it's just the UI that breaks.

OK. Thanks for the explanation.