Page MenuHomePhabricator

Can't create new pages in file namespace on Russian Wikipedia (due to local MediaWiki:Gadget-common-namespace-file.js)
Closed, InvalidPublicBUG REPORT

Description

Click https://ru.wikipedia.org/w/index.php?title=File:Callinectes_bocourti_5431018.jpg&action=edit and you can't edit/create the file page.

Click https://en.wikipedia.org/w/index.php?title=File:Callinectes_bocourti_5431018.jpg&action=edit and you can edit/create the file page. Thats how it should be!

A work around is safemode so if you click https://ru.wikipedia.org/w/index.php?title=File:Callinectes_bocourti_5431018.jpg&action=edit&safemode=1 you can edit.

The background for this is in short that a few files exist(ed) on ruwiki without a matching file page. Since all images should have a file page we tried to create it and failed (both me and a local admin). Discussion can be seen at https://ru.wikipedia.org/w/index.php?title=%D0%9E%D0%B1%D1%81%D1%83%D0%B6%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA%D0%B0:Oleg_Yunakov&oldid=145236089#Files_without_a_file_page_and_license

I then asked a steward on meta that also failed to create the page so it is not about missing rights. @HideonRosie succeded in creating the file page using "?safemode=1". See https://meta.wikimedia.org/w/index.php?title=User_talk:EPIC&oldid=28760519#ru:%D0%A4%D0%B0%D0%B9%D0%BB:Asio_logo.gif_etc.

So perhaps a gadget?

Event Timeline

Thanks for reporting this! I can confirm.

There is an additional inline style="display: none; in <form class="mw-editform" id="editform" name="editform" method="post" action="/w/index.php?title=%D0%A4%D0%B0%D0%B9%D0%BB:Callinectes_bocourti_5431018.jpg&amp;action=submit" enctype="multipart/form-data" data-mw-editform-type="initial" style="display: none;"> when not using safemode=true.

This is triggered by https://ru.wikipedia.org/wiki/MediaWiki:Gadget-common-namespace-file.js defined as a default gadget on https://ru.wikipedia.org/wiki/MediaWiki:Gadgets-definition
Blocking loading https://ru.wikipedia.org/w/load.php?debug=2&lang=en&modules=ext.gadget.common-namespace-file&skin=vector&version=ztntf makes the editor window appear.

User scripts, gadgets, templates, modules, custom CSS are local on-wiki content. Local content is managed independently on each wiki, by each wiki community themselves. This needs fixing on the local wiki by editing its local content. Thus I am closing this task here as local content is out of scope for Phabricator.
If you are looking for help with the local code on a wiki, please see https://meta.wikimedia.org/wiki/Tech instead. Thanks for your understanding!

Aklapper renamed this task from Can't create new pages in file namespace on Russian Wikipedia to Can't create new pages in file namespace on Russian Wikipedia (due to local MediaWiki:Gadget-common-namespace-file.js).May 21 2025, 9:26 AM

Please see some example of files exists without a page:

@HideonRosie: Not sure I understand. Do you mean that there is no Создать (Edit) in the tap bar at the top, but only Читать (Read)?

Again, this problem does not happen when not loading the local gadget ext.gadget.common-namespace-file.
If I block loading that gadget, there is the Создать tab.

See my previous comment what to do.

@Aklapper The gadget isn't relevant to files I mentioned above.

https://ru.wikipedia.org/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:%D0%9A%D0%B0%D1%82%D1%8F_%D0%A7%D0%B5%D1%85%D0%BE%D0%B2%D0%B0_%D0%AF_%D1%80%D0%BE%D0%B1%D0%BE%D1%82.jpg?safemode=1

Ok, I disabled every gadget and user JS. But why the tab is "Create" instead of "Edit"? Why does the file exists without even a description page?

image.png (1×1 px, 344 KB)

Note that the file isn't available in Commons.

Uh, interesting. Yes, that is strange. I see the same problem here.
This task is about "Can't create new pages in file namespace". What you describe seems to be "Existing local file page shows 'Create' tab" and sounds like a different problem for a different task, if I understand correctly?

Thank you. I agree that it is not a bug if the problem is a gadget.

The reason I created this is because of files like [[:Файл:KirShmona.gif]] where no local file page exist even if there is a local file.

To simplify the report and to prevent that someone "ruined" this report by creating the missing file pages before someone had a chance to check this bug I just mentioned a random file from Commons instead where you also can't create a file page. That may have been a mistake tho.

Uh, interesting. Yes, that is strange. I see the same problem here.
This task is about "Can't create new pages in file namespace". What you describe seems to be "Existing local file page shows 'Create' tab" and sounds like a different problem for a different task, if I understand correctly?

Yes. May create a new task if needed.