Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Call to undefined method load() for plugin e_admin.php generated #3715

Closed
LaocheXe opened this issue Mar 7, 2019 · 3 comments
Assignees
Labels
core: Admin-UI type: bug A problem that should not be happening
Milestone

Comments

@LaocheXe
Copy link
Member

LaocheXe commented Mar 7, 2019

Uncaught Error: Call to undefined method roster_admin::load()

Fatal error: Uncaught Error: Call to undefined method roster_admin::load() in /usr/www/501st/e107/e107_handlers/admin_ui.php:6637 Stack trace: #0 /usr/www/501st/e107/e107_handlers/admin_ui.php(6683): e_admin_form_ui->setAdminAddonModel(Object(e_admin_tree_model), Array, 'news_id') #1 /usr/www/501st/e107/e107_handlers/admin_ui.php(5803): e_admin_form_ui->getList() #2 /usr/www/501st/e107/e107_handlers/admin_ui.php(2182): e_admin_ui->ListPage() #3 /usr/www/501st/e107/e107_handlers/admin_ui.php(1291): e_admin_controller->dispatchPage() #4 /usr/www/501st/e107/e107_admin/newspost.php(1789): e_admin_dispatcher->runPage() #5 {main} thrown in /usr/www/501st/e107/e107_handlers/admin_ui.php on line 6637

e107_admin/newspost.php?mode=main&action=list

Updated Github at 10:53 PM EST on 3-6-2019

Before Update I could go there and do stuff. Now I get that

@LaocheXe
Copy link
Member Author

LaocheXe commented Mar 7, 2019

Found the issue - In my plugin for the roster (still under development) I had e_admin.php generated by the plugin builder last year. Which generated this code:

` public function config($ui)
{
$action = $ui->getAction(); // current mode: create, edit, list
$type = $ui->getEventName(); // 'wmessage', 'news' etc. (core or plugin)
$id = $ui->getId();

	$config = array();
	$defaultValue = 'http://';

	switch($type)
	{
		case "news": // hook into the news admin form.
			$config['fields']['url'] =   array ( 'title' =>"Custom Field", 'type' => 'url', 'tab'=>1,  'writeParms'=> array('size'=>'xxlarge', 'placeholder'=>'', 'default'=>$defaultValue), 'width' => 'auto', 'help' => '', 'readParms' => '', 'class' => 'left', 'thclass' => 'left',  );

			$config['batchOptions'] = array('custom'    => 'Custom Batch Command');
			break;
	}

	//Note: 'urls' will be returned as $_POST['x_roster_url']. ie. x_{PLUGIN_FOLDER}_{YOURFIELDKEY}

	return $config;

}

`

Comment that code out works, but I just deleted it off my server (cause I have it locally) so yeah lol

@LaocheXe LaocheXe changed the title Bug: Uncaught Error: Call to undefined method roster_admin::load() Bug: Uncaught Error: Call to undefined method for plugin e_admin.php generated Mar 7, 2019
@Moc Moc added the type: bug A problem that should not be happening label Mar 7, 2019
@Moc Moc added this to the e107 2.2.0 milestone Mar 7, 2019
@Moc
Copy link
Member

Moc commented Mar 7, 2019

@CaMer0n Probably caused by 4e07b87

@Moc Moc changed the title Bug: Uncaught Error: Call to undefined method for plugin e_admin.php generated Uncaught Error: Call to undefined method for plugin e_admin.php generated Mar 7, 2019
@Moc Moc changed the title Uncaught Error: Call to undefined method for plugin e_admin.php generated Uncaught Error: Call to undefined method load() for plugin e_admin.php generated Mar 12, 2019
@CaMer0n
Copy link
Member

CaMer0n commented Mar 12, 2019

I will add a check for the method and it should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core: Admin-UI type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

3 participants