Page MenuHomePhabricator

Fatal error when previewing a template that doesn't yet exist
Closed, ResolvedPublic

Description

On the beta cluster, the page "User:Jackmcbarn/Page" contains "{{A nonexistent template}}" as the content. If you go to http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Template:A_nonexistent_template&action=edit and enter "User:Jackmcbarn/Page" in the page title box, a fatal error will be generated when previewing: PHP fatal error in /srv/common-local/php-master/extensions/TemplateSandbox/TemplateSandbox.hooks.php line 205:
Call to a member function isRedirect() on a non-object


Version: unspecified
Severity: major

Details

Reference
bz66141

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz66141.

This appears to have been caused by I83cdd4adaaa67f81e933654228eccdc9fcdf9009 in core.

Change 137511 had a related patch set uploaded by Awight:
(bug 66141) Allow replaceSection on an unborn page

https://gerrit.wikimedia.org/r/137511

Change 137641 had a related patch set uploaded by Anomie:
Properly handle preview when creating a template

https://gerrit.wikimedia.org/r/137641

Anomie added a comment.Jun 5 2014, 2:24 PM

While I83cdd4ad appears to have made the issue occur more often, the bug is still present before that change if you supply a section parameter when editing the nonexistent template.

Change 137641 merged by jenkins-bot:
Properly handle preview when creating a template

https://gerrit.wikimedia.org/r/137641

Change 137652 had a related patch set uploaded by Anomie:
Properly handle preview when creating a template

https://gerrit.wikimedia.org/r/137652

Change 137652 merged by jenkins-bot:
Properly handle preview when creating a template

https://gerrit.wikimedia.org/r/137652

Change 137653 had a related patch set uploaded by Anomie:
Update TemplateSandbox for bug 66141

https://gerrit.wikimedia.org/r/137653

Anomie added a comment.Jun 5 2014, 2:55 PM

Fixed in TemplateSandbox, and will be included in 1.24wmf8.

That's not to say Awight's patch isn't necessary (I haven't looked closely), but not needed for this bug.

Change 137653 merged by Reedy:
Update TemplateSandbox for bug 66141

https://gerrit.wikimedia.org/r/137653

Change 137511 had a related patch set uploaded by TheDJ:
WikiPage: Allow replaceSection on an nonexistent page

https://gerrit.wikimedia.org/r/137511

Change 137511 merged by jenkins-bot:
WikiPage: Allow replaceSection on an nonexistent page

https://gerrit.wikimedia.org/r/137511