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

Return value must be of type mixed, none returned #61

Closed
thomas-soemoen opened this issue Jan 25, 2023 · 3 comments
Closed

Return value must be of type mixed, none returned #61

thomas-soemoen opened this issue Jan 25, 2023 · 3 comments
Labels
bug Something isn't working v2 v2

Comments

@thomas-soemoen
Copy link

Hei there.

When I did a fresh install in Craft 4 on php 8.1.12 I got the following error when I tried to view the settings:

/admin/settings/plugins/craftagram

scaramangagency\craftagram\Craftagram::getSettingsResponse(): Return value must be of type mixed, none returned

in line 151

    public function getSettingsResponse(): mixed {
        Craft::$app->controller->redirect(UrlHelper::cpUrl('craftagram/settings'));
    }

The site is on Craft 4.3.6.1, php 8.1.12 and the plugin is 2.0.1.

@jsmrtn jsmrtn added bug Something isn't working v2 v2 labels Jan 26, 2023
@tomkiss
Copy link

tomkiss commented Feb 3, 2023

Also seeing this error on PHP 8.1, latest versions of Craft and Plugin, unable to install.

@tomkiss
Copy link

tomkiss commented Feb 3, 2023

OK, I discovered by uninstalling and reinstalling via the CP that there is a URL issue.

It looks like the two CP links to settings, linked in the logo icon here:

Screenshot 2023-02-03 at 10 31 34

And "settings" text here:
Screenshot 2023-02-03 at 10 31 21

...both link to the wrong place.

The both link to: /admin/settings/plugins/craftagram.

If you install via command line, you only ever see links to this broken URL.

Whereas, if you install via CP, after installation you are automatically taken to /admin/craftagram/settings/1?site, which appears to work OK.

Hope this is helpful!

@jsmrtn
Copy link
Owner

jsmrtn commented Feb 6, 2023

Fixed in 2.0.2

@jsmrtn jsmrtn closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2 v2
Projects
None yet
Development

No branches or pull requests

3 participants