Last modified: 2012-10-07 21:05:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42820, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40820 - Call to undefined method CreditsAction::getCredits()
Call to undefined method CreditsAction::getCredits()
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.21.x
All All
: Unprioritized blocker (vote)
: ---
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-06 15:43 UTC by Tim Landscheidt
Modified: 2012-10-07 21:05 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2012-10-06 15:43:50 UTC
Since probably gerrit change I68308aac96b89c2aec296e2a4fa385fd1d42ab5a got merged, I can't access my wiki any longer.  error_log says:

| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined method CreditsAction::getCredits() in /home/tim/public_html/w/includes/SkinTemplate.php on line 339
| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP Stack trace:
| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP   1. {main}() /home/tim/public_html/w/index.php:0
| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP   2. MediaWiki->run() /home/tim/public_html/w/index.php:59
| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP   3. MediaWiki->main() /home/tim/public_html/w/includes/Wiki.php:446
| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP   4. OutputPage->output() /home/tim/public_html/w/includes/Wiki.php:560
| [Sat Oct 06 15:24:45 2012] [error] [client 127.0.0.1] PHP   5. SkinTemplate->outputPage() /home/tim/public_html/w/includes/OutputPage.php:1988

Obviously, includes/actions/CreditsAction.php has CreditsAction::getCredits(), but I haven't tracked this down further yet.
Comment 1 Sam Reed (reedy) 2012-10-06 15:48:52 UTC
The somewhat obfuscated usage doesn't help:

$tpl->set( 'credits', Action::factory( 'credits', $this->getWikiPage(),
						$this->getContext() )->getCredits( $wgMaxCredits, $wgShowCreditsIfMax ) );



My dev wiki is working fine though

(In reply to comment #0)
> Obviously, includes/actions/CreditsAction.php has CreditsAction::getCredits(),
> but I haven't tracked this down further yet.

No it doesn't, as of the revision you suggested

class CreditsAction extends FormlessAction {

	public function getName() {
		return 'credits';
	}

	/**
	 * This is largely cadged from PageHistory::history
	 *
	 * @return String HTML
	 */
	public function onView() {
		$this->getOutput()->redirect( $this->getTitle()->getLocalURL( "action=info" ) );
	}
}
Comment 2 Sam Reed (reedy) 2012-10-06 15:49:55 UTC
/**
 * Set this to the number of authors that you want to be credited below an
 * article text. Set it to zero to hide the attribution block, and a negative
 * number (like -1) to show all authors. Note that this will require 2-3 extra
 * database hits, which can have a not insignificant impact on performance for
 * large wikis.
 */
$wgMaxCredits = 0;

/** If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
 * Otherwise, link to a separate credits page. */
$wgShowCreditsIfMax = true;


I guess you've got a max credits value of > 0
Comment 3 Alex Monk 2012-10-06 15:56:51 UTC
Gerrit change #26945
Comment 4 Tim Landscheidt 2012-10-06 16:12:27 UTC
(In reply to comment #2)
> [...]
> I guess you've got a max credits value of > 0

Yes, it was set to 1.  Setting it to 0 works.
Comment 5 Tim Landscheidt 2012-10-06 16:15:27 UTC
(In reply to comment #1)
> > Obviously, includes/actions/CreditsAction.php has CreditsAction::getCredits(),
> > but I haven't tracked this down further yet.

> No it doesn't, as of the revision you suggested
> [...]

Confused two directories with different checkouts; you're right, of course.
Comment 6 Thomas Bleher 2012-10-07 08:40:57 UTC
This change also breaks the DumpHTML extension for me. It errors out with the same message:
PHP Fatal error:  Call to undefined method CreditsAction::getCredits() in /srv/www/mediawiki/core/includes/SkinTemplate.php on line 339

I did a git bisect to narrow the error down to this commit. Reverting it makes DumpHTML work again. Please fix this error!
Comment 7 Alex Monk 2012-10-07 21:05:16 UTC
Merged by Reedy.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links