Brickimedia/brickimedia

Reviews glitch

Closed this issue · 2 comments

Trying to create a new valid review page (ie, one with a corresponding article), results in a blank page (probably a PHP error?), eg, http://en.brickimedia.org/wiki/Review:3037_DUPLO_Strata

Making invalid reviews articles works fine though, eg, http://en.brickimedia.org/wiki/Review:3037_fake_page

This seems to be related to the Comments extension, as the precise error message from the logs related to various pages in the Review: namespace is:

PHP Fatal error:  Call to a member function getPrefixedDBkey() on a non-object in /var/www/core/extensions/Comments/CommentClass.php on line 511

The offending line, 511, is:

$returnTo = $this->page->title->getPrefixedDBkey(); // Determine a sane returnto URL parameter

So $this->page->title, which should be a Title instance, is not. This, naturally, makes zero sense, really. Comment::$page is supposed to be a CommentsPage instance and it's initialized in the constructor, as the first argument to the constructor (even the typehint suggests a CommentsPage). I was unable to verify on prod that this is the case, though, so it might be as simple as something passing a non-CommentsPage thing to Comment::__construct()...or then not.

cc'ing @UltrasonicNXT for further input.

Brickimedia no longer uses GitHub as an issue tracker.