Call to undefined method Fuel_advanced_module::info()

edited December 2015 in Modules
Hello,

I created the projects module by following this guide:
http://www.getfuelcms.com/blog/2010/12/19/learning-fuel-cms-part-3-creating-modules

Earlier I also had the same error after creating another module.
When I create or edit a project and hit the save button I get the error:

Fatal error: Call to undefined method Fuel_advanced_module::info() in /*/fuel/modules/fuel/models/base_module_model.php on line 1470


So I have been looking into my base_module_model model at the following function:

public function display_name($values)
{
$module =& $this->get_module();

$key = $module->info('display_field');

if(isset($values[$key]))
{
return (is_array($values[$key])) ? json_encode($values[$key]) : $values[$key];
}
else
{
return "";
}
}

The $module->info() doesn't seem to exist, so I looked into the $module object, and it seems to be filled correctly.
Any idea what causes this error?

Comments

  • $this->info() ?
  • edited 12:47AM
    I wonder if this is a bug. Roel, you mind replacing the get_module method in fuel/modules/fuel/models/base_module_model.php file (added FALSE as second parameter):
    public function get_module() { return $this->fuel->modules->get(strtolower(get_class($this)), FALSE); }
  • edited March 2016
    Experiencing the same error while working on an upgrade. I have only just started looking into it so it might be related or unrelated to this but in case it is figured I would comment and see whatever came of this.

    Edit: It worked for me so I should keep this change in the core file correct?
Sign In or Register to comment.