You are not logged in.
Bonjour à tous,
nous venons de passer de d'ODF 4.1.6 à Ametys ODF 4.4.9.
nous avions surchargé org.ametys.plugins.odf.Content.program.xml afin d'y rajouter un champ de stockage du type "fichier explorateur de ressource" pour mettre nos plaquettes de com en téléchargement.
Et nous utilisions donc l’explorateur de ressource pour accéder aux plaquettes stockées dans la partie publique de NUXEO (via connexion CMIS).
<!--Surcharge champ pour Plaquette de Communication-->
<cms:metadata name="comattachment" type="file">
<label i18n="true">application:CONTENT_PROGRAM_PLAQUETTE_COM_FILE_LABEL</label>
<description i18n="true">application:CONTENT_PROGRAM_PLAQUETTE_COM_FILE_DESC</description>
<widget>edition.file</widget>
<widget-params>
<param name="allowSources">external,resource</param>
</widget-params>
</cms:metadata>
J'arrive à sélectionner un fichier mais lorsque j'enregistre la formation j'ai un petit souci... il me vide entièrement tous les contenus de la formation et ne l'affiche plus (forcément, tous les champs obligatoires sont vides)
voici le message d'erreur :
class org.ametys.plugins.explorer.cmis.CMISResource cannot be cast to class org.ametys.plugins.explorer.resources.ModifiableResource (org.ametys.plugins.explorer.cmis.CMISResource and org.ametys.plugins.explorer.resources.ModifiableResource are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @455351c4)
Hide details
java.lang.ClassCastException: class org.ametys.plugins.explorer.cmis.CMISResource cannot be cast to class org.ametys.plugins.explorer.resources.ModifiableResource (org.ametys.plugins.explorer.cmis.CMISResource and org.ametys.plugins.explorer.resources.ModifiableResource are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @455351c4) at org.ametys.cms.data.ExplorerFile._getResource(ExplorerFile.java:116) at org.ametys.cms.data.ExplorerFile.getMimeType(ExplorerFile.java:95) at org.ametys.cms.data.type.ResourceElementTypeHelper.singleFileToSAX(ResourceElementTypeHelper.java:246) at org.ametys.cms.data.type.AbstractFileElementType._singleExplorerFileToSAX(AbstractFileElementType.java:351) at org.ametys.cms.data.type.AbstractFileElementType._valueToSAX(AbstractFileElementType.java:305) at org.ametys.core.model.type.AbstractElementType._valueToSAX(AbstractElementType.java:265) at org.ametys.core.model.type.AbstractElementType.valueToSAX(AbstractElementType.java:235) at org.ametys.plugins.repository.data.holder.impl.DataHolderHelper.dataToSAX(DataHolderHelper.java:421) at org.ametys.plugins.repository.data.holder.ModelAwareDataHolder.dataToSAX(ModelAwareDataHolder.java:399) at org.ametys.cms.content.ContentSaxer.saxAttributes(ContentSaxer.java:340) at org.ametys.cms.content.ContentSaxer.saxBody(ContentSaxer.java:168) at org.ametys.cms.content.ContentSaxer.saxContent(ContentSaxer.java:143) at org.ametys.cms.content.ContentGenerator._saxContent(ContentGenerator.java:121) at org.ametys.cms.content.ContentGenerator._generateContent(ContentGenerator.java:86) at org.ametys.cms.content.ContentGenerator.generate(ContentGenerator.java:70) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:782) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101) at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:321) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:125) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:782) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:181) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:140) at org.ametys.web.repository.PageGenerator._saxSource(PageGenerator.java:722) at org.ametys.web.repository.PageGenerator._saxZoneItem(PageGenerator.java:519) at org.ametys.web.repository.PageGenerator._saxZoneItems(PageGenerator.java:389) at org.ametys.web.repository.PageGenerator._saxZone(PageGenerator.java:316) at org.ametys.web.repository.PageGenerator.generate(PageGenerator.java:237) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:782) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101) at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:321) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:125) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254) at org.apache.cocoon.Cocoon.process(Cocoon.java:699) at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:571) at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834)
Dans la formation, si je créé un lien de type fichier partagé pointant vers un fichier de nuxeo (CMIS) dans un contenu de texte riche, je ne rencontre aucun problème.
Je me dis donc que ça vient forcément de ma surcharge et que ce type de widget ne convient plus ?
ou bien que je dois stocker la cible différemment ? ou avec des infos en plus ?
Ou selon vous le problème est ailleurs ? (J'ai regardé les issues.ametys.org mais je n'ai pas trouvé trace d'un bug identique)
En espérant que vous puissiez nous aiguiller.
bonne journée
Offline
Bonjour,
Votre champ est très bien défini mais nous avons visiblement un bug au niveau des fichiers CMIS dans ce type de champ. Nous n'étions jamais tombé sur ce cas de figure, c'est donc resté transparent jusqu'ici.
Je vous invite à ouvrir une issue sur notre JIRA : , le projet concerné est EXPLORER. L'issue doit être rédigée en anglais.
En attendant, votre moyen de contournement est effectivement de ne pas cibler un fichier venant d'une source CMIS.
Cordialement,
Last edited by Bérénice MAUREL (07/09/2022 09:36:03)
Bérénice MAUREL
Offline