Extension doesn't work with Contao 4.8
Closed this issue · 2 comments
syntaxys commented
There is a bug in combination with Contao >= 4.8.2
Argument 2 passed to Contao\Controller::getTemplateGroup() must be of the type array, string given, called in /path/to/contao/vendor/fritzmg/contao-sharebuttons/system/modules/sharebuttons/classes/ShareButtons.php on line 367
Changing the code like this will fix it:
...
public function getSharebuttonsTemplates(DataContainer $dc)
{
// $intPid = $dc->activeRecord->pid;
$intPid = array($dc->activeRecord->pid);
if (\Input::get('act') == 'overrideAll')
{
// $intPid = \Input::get('id');
$intPid = array(\Input::get('id'));
}
return \Controller::getTemplateGroup('sharebuttons_', $intPid);
}
fritzmg commented
Not sure why I put that even in. That function doesn't take any parameters, neither in Contao 3, nor 4 (or used to).