Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Trying to write a plugin for 2.2.1 and it's a blank white page

edited August 2016 in Vanilla 2.0 - 2.8

Hi, I've recently upgraded my old, old, old Vanilla 1 site which had custom software for a family fantasy-like football league I run. I'm trying to rewrite it in the Vanilla 2 framework, and even with $Configuration['Debug'] = true in my config.php, the only thing that happens when I try to display something in my plugin is a blank white page.

I'm just starting with the absolute basics here, trying to put a hello world on screen at my plugin path. The Custom Pages plugin is no help because it appears to be broken as well.

Here's what my super minimal class.ffff.plugin.php file looks like (skipping the plugin registration bit):

class FFFFPlugin extends Gdn_Plugin {

public function __construct() {
parent::__construct();
}

public function base_render_before($Sender) {
if ($Sender->Menu && Gdn::session()->isValid()) {
$Sender->Menu->addLink('FFFF', '4F HQ', '/plugin/ffff');
}
}

public function pluginController_ffff_Create(&$Sender) {
die("here");
$Sender->render();
$this->dispatch($Sender, $Sender->RequestArgs);
}
}

The addLink works fine on the main page, but when I go to mysite.com/plugin/ffff, where, from all I've read, the pluginController function should kick in, I get nothing. Just empty page. No debug information of any kind. Each of those three lines is an attempt to display something, anything.

Can anyone give me some pointers on what might be going wrong? It's rather imperative I get this sorted out before football season starts. :P

edit: The ` code markup doesn't appear to work. :(

Comments

Sign In or Register to comment.