Jump to:

22996 Posts in 11844 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » SS3.1 Invalid argument Warning ConfigManifest.php - any ideas?

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

Page: 1
Go to End
Author Topic: 638 Views
  • neilcreagh
    Avatar
    Community Member
    88 Posts

    SS3.1 Invalid argument Warning ConfigManifest.php - any ideas? Link to this post

    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

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: SS3.1 Invalid argument Warning ConfigManifest.php - any ideas? Link to this post

    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.

  • Andre
    Avatar
    Community Member
    125 Posts

    Re: SS3.1 Invalid argument Warning ConfigManifest.php - any ideas? Link to this post

    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.

  • neilcreagh
    Avatar
    Community Member
    88 Posts

    Re: SS3.1 Invalid argument Warning ConfigManifest.php - any ideas? Link to this post

    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.

  • Marcus
    Avatar
    Administrator
    85 Posts

    Re: SS3.1 Invalid argument Warning ConfigManifest.php - any ideas? Link to this post

    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')
    );

    638 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.