cancel
Showing results for 
Search instead for 
Did you mean: 

[Résolu] HTTP 500 avec les presets personnalisés

ruffieuxlu
Champ in-the-making
Champ in-the-making
(Re)Bonjour,

J'ai suivi les liens que m'a fourni BertandF hier et ils m'ont été d'un grand secours. J'ai malheureusement des erreurs que l'auteur des deux tutoriels n'a apparemment pas eu. (http://zandadev.com/zach/alf/?p=21 et http://zandadev.com/zach/alf/?p=37)
Pour le premier tuto je l'ai suivi à la lettre, je peux créer un site avec mon preset mais lorsque celui-ci est créé et que je veux aller dessus via le share j'ai cette erreur :
javax.servlet.ServletException: Could not resolve view with name 'site/plop/dashboard' in servlet with name 'Spring Surf Dispatcher Servlet'
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1042)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:67)
J'ai copié à la racine du site l'arborescence d'un site fonctionnel mais cela n'a rien changé.

Mes fichiers de configs :

mes fichiers de presets
Actuellement ce sont juste des copies du fichier de preset original (preset.xml) ou j'ai juste changé la valeur de l'id pour que cela corresponde avec create-site.get.js

create-site.get.js
var sitePresets = [{id: "site-dashboard", name: msg.get("title.collaborationSite")}, {id: "project-site-dashboard", name: msg.get("title.projectSite")}, {id: "commercial-site-dashboard", name: msg.get("title.commercialSite")}];
        model.sitePresets = sitePresets;

create-site.get.properties
J'ai ajouté ces deux lignes à la fin
title.projectSite=Project Site
title.commercialSite=Commercial Data Site

create-site.get_fr.properties
Comme je dispose du patch de traduction française pour le share j'ai également modifié ce fichier avec ces deux lignes
title.projectSite=Site de projet
title.commercialSite=Site de donnees commerciales

Je suis preneur pour toutes les idées que vous pourriez avoir  Smiley Very Happy
4 REPLIES 4

bertrandf
Champ on-the-rise
Champ on-the-rise
Bonjour,
Pourriez-vous afficher le contenu de votre fichier presets.xml svp ?

Merci.

ruffieuxlu
Champ in-the-making
Champ in-the-making
Oui, mais je ne l'ai pas touché, donc il ne devrait pas y avoir de soucis de ce côté là :
<?xml version='1.0' encoding='UTF-8'?>
<presets>
   <!– Well known preset used to generate the default Collaboration Site dashboard –>
   <preset id="site-dashboard">
      <components>
         <!– title –>
         <component>
            <scope>page</scope>
            <region-id>title</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/title/collaboration-title</url>
         </component>
         <!– navigation –>
         <component>
            <scope>page</scope>
            <region-id>navigation</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/navigation/collaboration-navigation</url>
         </component>
         <!– dashboard components –>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-welcome</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/docsummary</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/activityfeed</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-profile</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/colleagues</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-3</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-links</url>
         </component>
      </components>
      <pages>
         <page id="site/${siteid}/dashboard">
            <title>Collaboration Site Dashboard</title>
            <title-id>page.siteDashboard.title</title-id>
            <description>Collaboration site's dashboard page</description>
            <description-id>page.siteDashboard.description</description-id>
            <template-instance>dashboard-3-columns</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"wiki-page"}, {"pageId":"blog-postlist"}, {"pageId":"documentlibrary"}, {"pageId":"calendar"},{"pageId":"links"},{"pageId":"discussions-topiclist"},{"pageId":"data-lists"}]</sitePages>
            </properties>
</page>
      </pages>
   </preset>

   <!– Well known preset used to generate the default User dashboard –>
   <preset id="user-dashboard">
      <components>
         <!– title –>
         <component>
            <scope>page</scope>
            <region-id>title</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/title/user-dashboard-title</url>
         </component>
         <!– dashboard components –>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/user-calendar</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/alfresco-network</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/user-welcome</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/rssfeed</url>
            <properties>
               <limit>10</limit>
            </properties>
         </component>
         <component>
             <scope>page</scope>
             <region-id>component-2-3</region-id>
             <source-id>user/${userid}/dashboard</source-id>
             <url>/components/dashlets/my-activities</url>
          </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-1</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-profile</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-2</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-sites</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-3</region-id>
            <source-id>user/${userid}/dashboard</source-id>
            <url>/components/dashlets/my-tasks</url>
         </component>
      </components>
      <pages>
         <page id="user/${userid}/dashboard">
            <title>User Dashboard</title>
            <title-id>page.userDashboard.title</title-id>
            <description>Users dashboard page</description>
            <description-id>page.userDashboard.description</description-id>
            <template-instance>dashboard-3-columns</template-instance>
            <authentication>user</authentication>
         </page>
      </pages>
   </preset>

   <!– Well known preset used to generate the default RM Site dashboard –>
   <preset id="rm-site-dashboard">
      <components>
         <!– title –>
         <component>
            <scope>page</scope>
            <region-id>title</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/title/collaboration-title</url>
         </component>
         <!– navigation –>
         <component>
            <scope>page</scope>
            <region-id>navigation</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/navigation/collaboration-navigation</url>
         </component>
         <!– dashboard components –>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-welcome</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/docsummary</url>
            <properties>
               <dod5015>true</dod5015>
            </properties>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/activityfeed</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-profile</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-3-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/colleagues</url>
         </component>
      </components>
      <pages>
         <page id="site/${siteid}/dashboard">
            <title>Records Management Site Dashboard</title>
            <title-id>page.rmSiteDashboard.title</title-id>
            <description>Records Management site's dashboard page</description>
            <description-id>page.rmSiteDashboard.description</description-id>
            <template-instance>dashboard-3-columns</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}, {"pageId":"rmsearch"}]</sitePages>
               <pageMetadata>{"documentlibrary":{"titleId":"page.rmDocumentLibrary.title", "descriptionId":"page.rmDocumentLibrary.description", "type":"dod5015"}}</pageMetadata>
            </properties>
         </page>
      </pages>
   </preset>

   <!– Well known preset used to generate the Sharepoint protocol integration Site –>
   <preset id="document-workspace">
      <components>
         <!– title –>
         <component>
            <scope>page</scope>
            <region-id>title</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/title/collaboration-title</url>
         </component>
         <!– navigation –>
         <component>
            <scope>page</scope>
            <region-id>navigation</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/navigation/collaboration-navigation</url>
         </component>
         <!– dashboard components –>
         <component>
            <scope>page</scope>
            <region-id>component-1-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-welcome</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-1-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/docsummary</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-1</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/site-profile</url>
         </component>
         <component>
            <scope>page</scope>
            <region-id>component-2-2</region-id>
            <source-id>site/${siteid}/dashboard</source-id>
            <url>/components/dashlets/colleagues</url>
         </component>
      </components>
      <pages>
         <page id="site/${siteid}/dashboard">
            <title>Document Workspace Dashboard</title>
            <title-id>page.workspace.title</title-id>
            <description>Document Workspace dashboard page</description>
            <description-id>page.workspace.description</description-id>
            <template-instance>dashboard-2-columns-wide-left</template-instance>
            <authentication>user</authentication>
            <properties>
               <sitePages>[{"pageId":"documentlibrary"}, {"pageId":"links"}]</sitePages>
            </properties>
         </page>
      </pages>
   </preset>
</presets>
J'ai oublié de préciser que pour mes presets, j'ai copié celui-ci, mais pas dans son intégralité biensûr, je n'ai copié que la partie <preset id="site-dashboard">[…]</preset> en changeant l'id.

bertrandf
Champ on-the-rise
Champ on-the-rise
Je vous demandais le fichier presets avec vos changements, le fichier par défaut je l'ai également dans mon alfresco.

Vous l'avez positionné ou votre preset ? Vous l'avez bien mis dans le fichier presets.xml ?

ruffieuxlu
Champ in-the-making
Champ in-the-making
Humpf erreur résolue, par erreur j'avais supprimé la balise </presetS> à la fin du document.

Sinon mis à part cette erreur d'interface chaise-clavier, j'en ai une autre qui ne vient pas de moi : je m'étais attaqué aussi au 2ème tuto, mais lorsque je veux créer la règle sur le répertoire 'Sites' j'obtiens cette erreur :

An error has occured in the Share component: /share/service/components/rules/rule-edit.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 00140007 Failed to load script 'classpath*:alfresco/site-webscripts/org/alfresco/components/rules/rule-edit.get.js': 00140006 SyntaxError: il manque ']' après une liste d'éléments (file:/opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/rule-edit.get.js#42(eval)#3135)
Server: Alfresco Spring WebScripts - v1.0.0 (Milestone 3 357) schema 1'000
Time: 14 janv. 2011 13:51:47
Click here to view full technical information on the error.

Je n'ai jamais touché aux composants cités, donc je suis un peu perplexe.

Auriez-vous une idée ?