Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SS3.1 Invalid argument Warning ConfigManifest.php - any ideas?


Reply

5 Posts   1038 Views

Avatar
neilcreagh

1 October 2013 at 5:43am Community Member, 94 Posts

I've installed SS3.1 and I'm getting a Warning: Invalid argument supplied for foreach() in ...framework/core/manifest/ConfigManifest.php on line 655

This Google Group post seems to think it's an invalid yml file or "Comes up when you have an empty yml file somewhere"

I had installed the modules BetterButtons, SortableGridField and userforms but removing these again didn't seem to help, the warning persists.

Has anyone got any ideas how to debug this?

Also, how do you turn on dev mode in SS3.1, I'm not sure what to write in the config.yml or where to put it?

Thanks

Avatar
Bambii7

1 October 2013 at 6:40pm Community Member, 254 Posts

Hmm can't help much with the error sorry. But you should still be able set the environment to dev inside your _config.php with Director::set_environment_type('dev');

Its a tough one to debug. Xdebug is a good option for php but requires a bit of set up.
Without advanced set ups I would go with the process of elimination (I usually do this). Start with a fresh install, check that it works, add one module, check that it works etc, and continue until you break it.

Also another note, check that all the modules have upgraded to 3.1. You might have better luck with 3.0 as the modules are more likely to offer support for it.

Avatar
Andre

3 October 2013 at 12:14am Community Member, 126 Posts

Hi, had that error also a few weeks ago.

Check for your _config/routes.yml and _config/configyml Files. If there are Files with only commented content these might be the ones disturbing. Try to delete these files and see if the error remains.

Avatar
neilcreagh

3 October 2013 at 4:27am Community Member, 94 Posts

No joy but thanks for the replies. Removing the BetterButtons module seems to have removed the warning from the website front-end and from the CMS but if I run dev/build?flush=1 the warning is still there... so not sure if it is due to betterbuttons or not? Very confusing.

I can't get dev mode to work at all, so I might try moving from this current shared hosting to see how much is down to this hosting set-up.

Avatar
Marcus

6 December 2013 at 7:05pm Administrator, 86 Posts

In case anyone comes across this post from a google search like I did - I was getting errors of the form

PHP Warning: Invalid argument supplied for foreach() in .../framework/core/manifest/ConfigManifest.php on line 140

What was happening is that the i18n functionality was clearing out all the newly cached manifest information (created by the dev/build process) during the dev/build processing because I had ?flush=1 in the URL. To fix it, I've had to create a new cache object in config to change the path of the i18n cached data

if (!file_exists(TEMP_FOLDER . '/i18n')) {
   @mkdir(TEMP_FOLDER . '/i18n');
   @chmod(TEMP_FOLDER . '/i18n', 0770);
}

require_once 'Zend/Cache.php';
require_once 'Zend/Translate/Adapter.php';

$i18ncache = Zend_Cache::factory(
   'Core',
   'File',
   array('lifetime' => null, 'automatic_serialization' => true, 'automatic_cleaning_factor' => 0),
   array('hashed_directory_umask' => 0775, 'cache_file_umask' => 0660, 'cache_dir' => TEMP_FOLDER . '/i18n')
);