AnsweredAssumed Answered

js code include two times in the dashboard

Question asked by dranakan on Apr 10, 2013
Latest reply on Apr 15, 2013 by dranakan
Hello,

I get a bug and I can't find… The code on the dashboard is included two times. For example the file yui-common.js in declared two times.

Source html :


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>Alfresco » Tableau de bord utilisateur</title>
   <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

   <!– Icons –>
   <link rel="shortcut icon" href="/share/res/favicon.ico" type="image/vnd.microsoft.icon" />
   <link rel="icon" href="/share/res/favicon.ico" type="image/vnd.microsoft.icon" />

   <!– YUI –>
   <script type="text/javascript" src="/share/res/js/yui-common.js"></script>
   <script type="text/javascript" src="/share/res/js/bubbling.v2.1-min.js"></script>
   <script type="text/javascript">//<![CDATA[
      YAHOO.Bubbling.unsubscribe = function(layer, handler, scope)
      {
         this.bubble[layer].unsubscribe(handler, scope);
      };
   //]]></script>

   <!– Common i18n msg properties –>
   <script type="text/javascript" src="/share/service/messages.js?locale=fr"></script>

   <!– Alfresco web framework constants –>
   <script type="text/javascript">//<![CDATA[
      Alfresco.constants = Alfresco.constants || {};
      Alfresco.constants.DEBUG = false;
      Alfresco.constants.AUTOLOGGING = false;
      Alfresco.constants.PROXY_URI = window.location.protocol + "//" + window.location.host + "/share/proxy/alfresco/";
      Alfresco.constants.PROXY_URI_RELATIVE = "/share/proxy/alfresco/";
      Alfresco.constants.PROXY_FEED_URI = window.location.protocol + "//" + window.location.host + "/share/proxy/alfresco-feed/";
      Alfresco.constants.THEME = "default";
      Alfresco.constants.URL_CONTEXT = "/share/";
      Alfresco.constants.URL_RESCONTEXT = "/share/res/";
      Alfresco.constants.URL_PAGECONTEXT = "/share/page/";
      Alfresco.constants.URL_SERVICECONTEXT = "/share/service/";
      Alfresco.constants.URL_FEEDSERVICECONTEXT = "/share/feedservice/";
      Alfresco.constants.USERNAME = "test2";
      Alfresco.constants.SITE = "";
      Alfresco.constants.PAGEID = "";
      Alfresco.constants.PORTLET = false;
      Alfresco.constants.PORTLET_URL = unescape("");
      Alfresco.constants.JS_LOCALE = "fr";
   //]]></script>

   <!– Alfresco web framework common resources –>
   <script type="text/javascript" src="/share/res/js/flash/AC_OETags-min.js"></script>
   <script type="text/javascript" src="/share/res/js/alfresco-min.js"></script>
   <script type="text/javascript" src="/share/res/modules/editors/tiny_mce/tiny_mce.js"></script>
   <script type="text/javascript" src="/share/res/modules/editors/tiny_mce-min.js"></script>
   <script type="text/javascript" src="/share/res/modules/editors/yui_editor-min.js"></script>
   <script type="text/javascript" src="/share/res/js/forms-runtime-min.js"></script>

   <!– Share Constants –>
   <script type="text/javascript">//<![CDATA[
      Alfresco.service.Preferences.FAVOURITE_DOCUMENTS = "org.alfresco.share.documents.favourites";
      Alfresco.service.Preferences.FAVOURITE_FOLDERS = "org.alfresco.share.folders.favourites";
      Alfresco.service.Preferences.FAVOURITE_SITES = "org.alfresco.share.sites.favourites";
      Alfresco.service.Preferences.IMAP_FAVOURITE_SITES = "org.alfresco.share.sites.imapFavourites";
      Alfresco.service.Preferences.COLLAPSED_TWISTERS = "org.alfresco.share.twisters.collapsed";
      Alfresco.service.Preferences.RULE_PROPERTY_SETTINGS = "org.alfresco.share.rule.properties";
      Alfresco.constants.URI_TEMPLATES =
      {
         "sitedashboardpage": "/site/{site}/dashboard",
         "sitepage": "/site/{site}/{pageid}",
         "userdashboardpage": "/user/{userid}/dashboard",
         "userpage": "/user/{userid}/{pageid}",
         "userprofilepage": "/user/{userid}/profile",
         "userdefaultpage": "/user/{pageid}",
         "consoletoolpage": "/console/{pageid}/{toolid}",
         "consolepage": "/console/{pageid}"
      };
      Alfresco.constants.HELP_PAGES =
      {
         "share-help": "http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/topics/sh-uh-welcome.html",
         "share-tutorial": "http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/gs-intro.html"
      };
      Alfresco.constants.HTML_EDITOR = 'tinyMCE';
   //]]></script>

   <!– Share resources –>
   <script type="text/javascript" src="/share/res/js/share-min.js"></script>
   <script type="text/javascript" src="/share/res/js/lightbox-min.js"></script>

   <!– Common stylesheets gathered to workaround IEBug KB262161 –>
   <style type="text/css" media="screen">
      @import "/share/res/css/yui-fonts-grids.css";
      @import "/share/res/yui/columnbrowser/assets/columnbrowser.css";
      @import "/share/res/yui/columnbrowser/assets/skins/default/columnbrowser-skin.css";
      @import "/share/res/yui/assets/skins/default/skin.css";
      @import "/share/res/css/base.css";
      @import "/share/res/css/yui-layout.css";
      @import "/share/res/themes/default/presentation.css";
   </style>


   <!– Icons –>
   <link rel="shortcut icon" href="/share/res/favicon.ico" type="image/vnd.microsoft.icon" />
   <link rel="icon" href="/share/res/favicon.ico" type="image/vnd.microsoft.icon" />

   <!– YUI –>
   <script type="text/javascript" src="/share/res/js/yui-common.js"></script>
   <script type="text/javascript" src="/share/res/js/bubbling.v2.1-min.js"></script>
   <script type="text/javascript">//<![CDATA[
      YAHOO.Bubbling.unsubscribe = function(layer, handler, scope)
      {
         this.bubble[layer].unsubscribe(handler, scope);
      };
   //]]></script>

   <!– Common i18n msg properties –>
   <script type="text/javascript" src="/share/service/messages.js?locale=fr"></script>

   <!– Alfresco web framework constants –>
   <script type="text/javascript">//<![CDATA[
      Alfresco.constants = Alfresco.constants || {};
      Alfresco.constants.DEBUG = false;
      Alfresco.constants.AUTOLOGGING = false;
      Alfresco.constants.PROXY_URI = window.location.protocol + "//" + window.location.host + "/share/proxy/alfresco/";
      Alfresco.constants.PROXY_URI_RELATIVE = "/share/proxy/alfresco/";
      Alfresco.constants.PROXY_FEED_URI = window.location.protocol + "//" + window.location.host + "/share/proxy/alfresco-feed/";
      Alfresco.constants.THEME = "default";
      Alfresco.constants.URL_CONTEXT = "/share/";
      Alfresco.constants.URL_RESCONTEXT = "/share/res/";
      Alfresco.constants.URL_PAGECONTEXT = "/share/page/";
      Alfresco.constants.URL_SERVICECONTEXT = "/share/service/";
      Alfresco.constants.URL_FEEDSERVICECONTEXT = "/share/feedservice/";
      Alfresco.constants.USERNAME = "test2";
      Alfresco.constants.SITE = "";
      Alfresco.constants.PAGEID = "";
      Alfresco.constants.PORTLET = false;
      Alfresco.constants.PORTLET_URL = unescape("");
      Alfresco.constants.JS_LOCALE = "fr";
   //]]></script>

   <!– Alfresco web framework common resources –>
   <script type="text/javascript" src="/share/res/js/flash/AC_OETags-min.js"></script>
   <script type="text/javascript" src="/share/res/js/alfresco-min.js"></script>
   <script type="text/javascript" src="/share/res/modules/editors/tiny_mce/tiny_mce.js"></script>
   <script type="text/javascript" src="/share/res/modules/editors/tiny_mce-min.js"></script>
   <script type="text/javascript" src="/share/res/modules/editors/yui_editor-min.js"></script>
   <script type="text/javascript" src="/share/res/js/forms-runtime-min.js"></script>

   <!– Share Constants –>
   <script type="text/javascript">//<![CDATA[
      Alfresco.service.Preferences.FAVOURITE_DOCUMENTS = "org.alfresco.share.documents.favourites";
      Alfresco.service.Preferences.FAVOURITE_FOLDERS = "org.alfresco.share.folders.favourites";
      Alfresco.service.Preferences.FAVOURITE_SITES = "org.alfresco.share.sites.favourites";
      Alfresco.service.Preferences.IMAP_FAVOURITE_SITES = "org.alfresco.share.sites.imapFavourites";
      Alfresco.service.Preferences.COLLAPSED_TWISTERS = "org.alfresco.share.twisters.collapsed";
      Alfresco.service.Preferences.RULE_PROPERTY_SETTINGS = "org.alfresco.share.rule.properties";
      Alfresco.constants.URI_TEMPLATES =
      {
         "sitedashboardpage": "/site/{site}/dashboard",
         "sitepage": "/site/{site}/{pageid}",
         "userdashboardpage": "/user/{userid}/dashboard",
         "userpage": "/user/{userid}/{pageid}",
         "userprofilepage": "/user/{userid}/profile",
         "userdefaultpage": "/user/{pageid}",
         "consoletoolpage": "/console/{pageid}/{toolid}",
         "consolepage": "/console/{pageid}"
      };
      Alfresco.constants.HELP_PAGES =
      {
         "share-help": "http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/topics/sh-uh-welcome.html",
         "share-tutorial": "http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/gs-intro.html"
      };
      Alfresco.constants.HTML_EDITOR = 'tinyMCE';
   //]]></script>

   <!– Share resources –>
   <script type="text/javascript" src="/share/res/js/share-min.js"></script>
   <script type="text/javascript" src="/share/res/js/lightbox-min.js"></script>

   <!– Common stylesheets gathered to workaround IEBug KB262161 –>
   <style type="text/css" media="screen">
      @import "/share/res/css/yui-fonts-grids.css";
      @import "/share/res/yui/columnbrowser/assets/columnbrowser.css";
      @import "/share/res/yui/columnbrowser/assets/skins/default/columnbrowser-skin.css";
      @import "/share/res/yui/assets/skins/default/skin.css";
      @import "/share/res/css/base.css";
      @import "/share/res/css/yui-layout.css";
      @import "/share/res/themes/default/presentation.css";
   </style>


   <!– Template Resources (nested content from < @templateHeader > call) –>
   <!– Additional template resources –>


I have not modify alfresco-common.ftl and resources.get.html.ftl.
I have checked the files (also in tomcat/shared/) :
•   The region “head-resources” is defined only one time (in site-data/components/global.head-resources.xml)
•   The is only one file alfresco-template.ftl.
•   The is only one file resources.get.html.ftl.
•   resources.get.html.ftl has only 1 time his content defined.

The alfresco-template.ftl has this content :

<head>
   <title><@region id="head-title" scope="global" chromeless="true"/></title>
   <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
</#if>
   <@region id="head-resources" scope="global" chromeless="true"/>

   <!– Template Resources (nested content from < @templateHeader > call) –>


Has someone an idea where could be the bug ?

Outcomes