Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-12207

[Script] Error on column of common ancestors of results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.8.3, 4.9.0
    • None
    • None
    • None
    • 4.9.0 M2
    • Oui

      How to reproduce:

      • With ODF Web Template
      • Exclude a program and a course from publication
      • Create a script retrieveing these contents with columns title and code

       

      let catalog = "2024-2025";
      let contents = Repository.query(`//element(*, ametys:content)[@ametys-internal:publishable = 'false' and @ametys:catalog='${catalog}']`);
      return Content.toGridFormat(["title", "code"], contents);
      • An error occurs because code attribute is not searched on programItem common ancestor but should be => KO
      Caused by: org.apache.avalon.framework.configuration.ConfigurationException: Unable to parse columns of search model @null
      at org.ametys.cms.search.ui.model.StaticSearchUIModel#configure:226
      ... 114 more
      Caused by: org.apache.avalon.framework.configuration.ConfigurationException: The item 'code' is not defined in model. @null
      at org.ametys.runtime.model.AbstractViewParser#_getModelItem:396
      at org.ametys.cms.contenttype.AbstractContentTypeViewParser#_getModelItem:68
      at org.ametys.cms.search.ui.model.StaticSearchUIModelColumnsParser#_getModelItem:87
      at org.ametys.runtime.model.AbstractViewParser#_parseModelViewItem:236
      at org.ametys.runtime.model.AbstractViewParser#_parseViewChild:139
      at org.ametys.runtime.model.AbstractViewParser#parseView:57
      at org.ametys.cms.search.ui.model.StaticSearchUIModel#configure:222
      ... 114 more
      Caused by: org.ametys.runtime.model.exception.UndefinedItemPathException: Unable to retrieve the model item at path 'code'. This path is not defined by the model.
      at org.ametys.runtime.model.ModelHelper#getModelItem:118
      at org.ametys.runtime.model.AbstractViewParser#_getModelItem:392
      ... 120 more 

            cbayle Caroline Bayle
            cbayle Caroline Bayle
            Caroline Bayle Caroline Bayle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: