Page MenuHomePhabricator

Call to undefined method Parser::disableCache()
Closed, InvalidPublic

Description

Several extensions use Parser::disableCache() :

It prevents the page from displaying!

Call to undefined method Parser::disableCache()

Problem solved by replacing the call to disableCache() with:

//$parser->disableCache();
$parser->getOutput()->updateCacheExpiry(0);

Event Timeline

ashley closed this task as Invalid.EditedDec 31 2020, 8:30 AM
ashley subscribed.

The extensions in question, MyVariables and UrlGetParameters, were updated to use the new method in November 2019 (4c34a2e64acdc8929fe53918e70f5ab4a84b7de3 for MyVariables, b3b66e83e91076b0e5c8aa563d9c137863fa16fc for UrlGetParameters); these patches are included in the release branch versions (REL1_35) for both extensions.

It's true that some things still *do* use Parser#disableCache (or more precisely "try to use", since they can't use a method that was removed, obviously), but maybe they should be archived for it doesn't look like the extensions in question are actually maintained by anyone; luckily there's only a handful of such extensions that we're talking about, most of the codesearch results are actually false positives (e.g. the Semantic MediaWiki stuff, etc.).

Boldly closing this as INVALID since there's nothing to do here, the patches have long been merged into the REL1_35 branch, so you just need to make sure you're using the appropriate version of said extensions in question.