Uploaded image for project: 'Blog'
  1. Blog
  2. BLOG-96

Error creating a blog site with a language other than english or french

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None

      To reproduce, create a blog site and select "english" and "spanish" as languages.

      Stack trace:

      org.ametys.plugins.repository.AmetysRepositoryException: Unable to save changes
      	at org.ametys.plugins.repository.jcr.SimpleAmetysObject.saveChanges(SimpleAmetysObject.java:243)
      	at org.ametys.plugins.blog.InitializeBlogSiteObserver.createPage(InitializeBlogSiteObserver.java:237)
      	at org.ametys.plugins.blog.InitializeBlogSiteObserver.initializeSitemap(InitializeBlogSiteObserver.java:187)
      	at org.ametys.plugins.blog.InitializeBlogSiteObserver.observe(InitializeBlogSiteObserver.java:156)
      	at org.ametys.core.observation.ObservationManager.notify(ObservationManager.java:115)
      	at org.ametys.web.repository.site.SiteDAO.configureSite(SiteDAO.java:493)
      

          [BLOG-96] Error creating a blog site with a language other than english or french

          You're right for a production environment, but isn't it a bug that it crashes in a dev environment?
          That could easily be fixed just by setting an empty or default title...

          Nicolas Gavalda (Inactive) added a comment - You're right for a production environment, but isn't it a bug that it crashes in a dev environment? That could easily be fixed just by setting an empty or default title...

          Do you run your test on a dev version ?

          There is no default catalog on a dev version, so if the chosen language is not associated with an existing catalogue (fr or en), the title of created blog pages will be empty and then the creation will fail.
          In a prod version, the english catalogue is the default catalog (messages_en.xml => messages.xml) so the title of pages should never be empty and the issue should not be reproductible.

          Could you confirm this ?

          Laurence Aumeunier added a comment - Do you run your test on a dev version ? There is no default catalog on a dev version, so if the chosen language is not associated with an existing catalogue (fr or en), the title of created blog pages will be empty and then the creation will fail. In a prod version, the english catalogue is the default catalog (messages_en.xml => messages.xml) so the title of pages should never be empty and the issue should not be reproductible. Could you confirm this ?

            ngavalda Nicolas Gavalda (Inactive)
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: