View more context

 

ssnoob

now what i did i tried to traced where does it fail.. and it's failing on the section when it checkes if its in DevMode

andante

on this line?

  1. if((Director::isDev() && !$runningTest && !isset($_REQUEST['combine'])) || !$this->combined_files_enabled) {
  2. return;
  3. }
ssnoob

i have another class which is CDNRequirements_Backend and it's almost the same as the Requirements.php with few differences..

the process_combined_files method of this wrapper is the one being used instead of the requirements.php... now i've seen that i have a decorator for all Controller that has this:

public function onBeforeInit(){ // Prevent logged in users (admin) to include the global frontside css // except if we are translating OR viewing a draft

    if( isset( $_SERVER['ADMIN_DOMAIN'] ) && Member::currentUser() && $_SERVER['ADMIN_DOMAIN'] ) {
        if( isset( $_GET[ 'translating' ] ) && $_GET[ 'translating' ] == 1 || isset( $_GET['stage'] ) ) {
        } else {
            return;
        }
    }

    Requirements::set_backend( new CDNRequirements_Backend() );
    Requirements::block( SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');

}

ssnoob

could it be that it's because im calling the CDNRequirements_Backend onBeforeinit thats why it's being treated in dev mode?

andante

throw a var_dump(Director::get_environment_type()); in just before you set the backend and see

kinglozzer

Doesn’t SS default to live unless you set it otherwise?