Page MenuHomePhabricator

Templatesused missing when edit from section
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Go to a page contains section.
  • Click editsection. (there should be a section=xx parameter in URL)

What happens?:
templatesused section missing under edit box.

What should have happened instead?:
It should appears.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
1.38.0-wmf.22 (529f223)

Event Timeline

More specific: there should be a templatesusedpreview message, but I could not found it when clicking from editsection link. templatesusedpreview section appears after clicking showpreview button.

Umherirrender subscribed.

This is expected from a performance point of view.

When open the edit form for the whole current page the "template used" section is selecting the database table templatelinks to get a list of it and add them to the page.
When open the edit form for a section, there is no information available about the used templates and nothing is shown. If the page gets previewed, this information are available from the parse and added to the form.
The parse is expensive in cpu and time and should be avoided for the inital edit form.

You can try to bypass this with the user preferences about direct preview (called "Show preview on first edit" on the editing section).

From the begin of the edit form and now there are some improvements on the parser side. I have no idea if it is okay to do a "metadata" parse on the first view of the edit form to get the necessary information. The typical html parse is not needed (expect the mention preferences is in active, than the alone metadata parse is not needed). Maybe this is something for the miser mode flag to hide it for performance reason on wmf wikis.
This are the same reasons as for T302175