•  
      request #7674 Catchable fatal error: when trying to "Create a new artifact" from artifact links field
    Infos
    #7674
    Nandan Giri (girin)
    2014-12-30 14:17
    2014-12-08 16:12
    7671
    Details
    Catchable fatal error: when trying to "Create a new artifact" from artifact links field
    Get this error in Tuleap 7.7.99.65

    Catchable fatal error: Argument 1 passed to Layout::shouldIncludeFatCombined() must be an array, null given, called in /usr/share/tuleap/src/common/layout/Layout.class.php on line 1184 and defined in /usr/share/tuleap/src/common/layout/Layout.class.php on line 1165
    Empty
    7.7
    CentOS 6
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2014-12-30
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    Nandan Giri (girin)2014-12-08 16:22

    In Layout.class.php I changed The following code to the code after to get it to work. Do not know if it is the right fix.

       public function displayJavascriptElements($params) {

            $combined_dir = Config::get('sys_combined_dir');
            if (! is_dir($combined_dir)) {
                $combined_dir = $GLOBALS['codendi_dir'] . '/src/www/scripts/combined';
            }
            $c = new Combined($combined_dir);
            if ($this->shouldIncludeFatCombined($params)) {
                echo $c->getScripts(array('/scripts/codendi/common.js'));

                $ckeditor_path         = '/scripts/ckeditor-4.3.2/';
                $ckeditor_path_for_ie7 = '/scripts/ckeditor-for-ie7/';
                echo '<!--[if IE 7]>
                    <script type="text/javascript">window.CKEDITOR_BASEPATH = "'. $ckeditor_path_for_ie7 .'";</script>
                    <script type="text/javascript" src="'. $ckeditor_path_for_ie7 .'/ckeditor.js"></script>
                    <![endif]-->
                    <!--[if ! IE 7]><!-->
                    <script type="text/javascript">window.CKEDITOR_BASEPATH = "'. $ckeditor_path .'";</script>
                    <script type="text/javascript" src="'. $ckeditor_path .'/ckeditor.js"></script>
                    <!--<![endif]-->
                ';
            } else {
                $this->includeSubsetOfCombined();
            }

    to

            $combined_dir = Config::get('sys_combined_dir');
            if (! is_dir($combined_dir)) {
                $combined_dir = $GLOBALS['codendi_dir'] . '/src/www/scripts/combined';
            }
            $c = new Combined($combined_dir);
            if ($params && $this->shouldIncludeFatCombined($params)) {
                echo $c->getScripts(array('/scripts/codendi/common.js'));

                $ckeditor_path         = '/scripts/ckeditor-4.3.2/';
                $ckeditor_path_for_ie7 = '/scripts/ckeditor-for-ie7/';
                echo '<!--[if IE 7]>
                    <script type="text/javascript">window.CKEDITOR_BASEPATH = "'. $ckeditor_path_for_ie7 .'";</script>
                    <script type="text/javascript" src="'. $ckeditor_path_for_ie7 .'/ckeditor.js"></script>
                    <![endif]-->
                    <!--[if ! IE 7]><!-->
                    <script type="text/javascript">window.CKEDITOR_BASEPATH = "'. $ckeditor_path .'";</script>
                    <script type="text/javascript" src="'. $ckeditor_path .'/ckeditor.js"></script>
                    <!--<![endif]-->
                ';
            } else {
                $this->includeSubsetOfCombined();
            }