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

Invalid Argument error #2

Open
minimallinux opened this issue Nov 18, 2017 · 6 comments
Open

Invalid Argument error #2

minimallinux opened this issue Nov 18, 2017 · 6 comments

Comments

@minimallinux
Copy link

I have an invalid argument error in SageExpress.php?

Warning: Invalid argument supplied for foreach() in /usr/local/ampps/www/wp/wp-content/themes/bootstrap/vendor/webstractions/sage-xpress/src/SageXpress.php on line 69

I haven't changed anything in this file.

@minimallinux
Copy link
Author

Also, error for menu insertion is displaying as plain text.
navwalkererrorsageexpress

@webstractions
Copy link
Owner

Did you copy the config files from this package into your theme? Specifically, config\app.php, which has the list of providers that it is looking for.

@webstractions
Copy link
Owner

Also make sure you are using the latest version. I added the auto-loading of providers in v0.2.0.

@webstractions
Copy link
Owner

@minimallinux Are you still having trouble with this?

@bodenko
Copy link

bodenko commented Feb 7, 2018

I'm getting this message too.
I have copied the config files to my theme /config folder but it seems like the providers can't be found.
I'm using Sage 9.0.0-beta.4 with the soberwp/controller - beta 4 too

sagexpress

@robrecord
Copy link

robrecord commented May 18, 2018

I found I have to also call them in to functions.php:

Container::getInstance()
    ->bindIf('config', function () {
        return new Config([
            'assets' => require dirname(__DIR__).'/config/assets.php',
            'theme' => require dirname(__DIR__).'/config/theme.php',
            'view' => require dirname(__DIR__).'/config/view.php',

            /* new files from SageXpress - add the following lines: */
            'app' => require dirname(__DIR__).'/config/app.php',
            'blade-directives' => require dirname(__DIR__).'/config/blade-directives.php',
            'menu' => require dirname(__DIR__).'/config/menu.php',
            'sidebar' => require dirname(__DIR__).'/config/sidebar.php',
            'comments' => require dirname(__DIR__).'/config/comments.php',
            /* END */

        ]);
    }, true);

You can comment out what you don't need but I think app.php has to be there.

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

No branches or pull requests

4 participants