Page MenuHomePhabricator

Content preloading should not cause weird categories added to the resulting page
Open, Needs TriagePublic

Description

This was reported initially on MediaWiki.org. I have seen it on wikis with REL1_39 and REL1_42 with the respective extension codes using the default URL schema (https://example.org/index.php?title=PageName).

<inputbox>
type=create
prefix=Extra:
preload=Template:PreloadWithCategory
buttonlabel=Create new page
useve=true
</inputbox>

Content of Template:PreloadWithCategory:

<includeonly>
[[Category:ExtraPage]]
</includeonly>

This adds the category "Index.php?title=Category:ExtraPage" instead of just "ExtraPage". In other words, it prepends "Index.php?title=Category:" to the intended category name.

Bildschirmfoto vom 2024-11-19 16-17-23.png (515×219 px, 13 KB)

I am unsure if this is caused by the default URL schema (https://example.org/index.php?title=PageName), VisualEditor (useve=true), or a combination of both.

I am unable to replicate the issue on a wiki using short URLs.

Event Timeline

Kghbln updated the task description. (Show Details)
Kghbln updated the task description. (Show Details)
Kghbln updated the task description. (Show Details)

Category pages are in "Category" namespace.

I am unsure what your comment refers to, but yes, categories are in the "Category" namespace. I added an image to the description to demonstrate the issue.