sage-xpress
sage-xpress copied to clipboard
Invalid Argument error
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.
Also, error for menu insertion is displaying as plain text.

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.
Also make sure you are using the latest version. I added the auto-loading of providers in v0.2.0.
@minimallinux Are you still having trouble with this?
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

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.