Topic on Project:Support desk

wfSpecialWhatlinkshere missing in \includes\SpecialWhatLinksHere

4
85.80.205.112 (talkcontribs)

When trying to embed the SpecialWhatlinkshere page, an error is thrown:

An exception occurred: call_user_func(wfSpecialWhatlinkshere) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback in /w/includes/SpecialPage.php on line 792

I followed the instruction on m:Help:Embed page, but it seems as if the wfSpecialWhatlinkshere function has been removed from the class, causing the error.

Version used: 1.16.5.

Thanks.

Bawolff (talkcontribs)

The instructions you followed are horribly outdated, which is why they didn't work.

As a general rule, we recommend against patching mediawiki, because it makes upgrades difficult, and often causes unforeseen problems down the road.

(For reference, that special page is now made includable/not-includable based on which class it extends in includes/specials/SpecialWhatlinkshere.php)

85.80.205.112 (talkcontribs)

Thanks for taking the time to reply.

What exactly should I change it to extend in order to get it to work as an embedded page? And how would I then go about calling it from my page?

Thanks again!

Bawolff (talkcontribs)

In theory you can change the line class SpecialWhatLinksHere extends SpecialPage { to class SpecialWhatLinksHere extends IncludableSpecialPage { in the file includes/specials/SpecialWhatlinkshere.php

However, there could be more complications then that to make it work. Pages that aren't marked as includable, often are not marked as includable for a reason. Often they won't work as expected when included or cause other problems. Furthermore, we generally discourage people custom-patching MediaWiki unless they really know what they are doing since it makes updating harder, and often causes unforeseen bugs.

Reply to "wfSpecialWhatlinkshere missing in \includes\SpecialWhatLinksHere"