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

Extension doesn't work with Contao 4.8 #41

Closed
syntaxys opened this issue Sep 18, 2019 · 2 comments
Closed

Extension doesn't work with Contao 4.8 #41

syntaxys opened this issue Sep 18, 2019 · 2 comments
Assignees
Labels

Comments

@syntaxys
Copy link

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
Copy link
Owner

fritzmg commented Sep 18, 2019

Not sure why I put that even in. That function doesn't take any parameters, neither in Contao 3, nor 4 (or used to).

@fritzmg
Copy link
Owner

fritzmg commented Sep 18, 2019

Fixed via 6da9a12 and released as 2.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants