Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23230

eZ Comments settings not considering default as fallback only, when more specific settings present

    Details

      Description

      I have the eZ Comments settings such as follows:

      ez_comments:
          system:
              default:
                  default_provider: disqus
                  content_comments:
                      article_ruleset:
                          enabled: true
                          match:
                              Identifier\Contenttype:
                                  - article
                                  - blog_posts
                  disqus:
                      shortname: <your-disqus-shortname>
              eng:
                  content_comments:
                      blog_post:
                          enabled: false
                          match:
                              Identifier\Contenttype:
                                  - blog_posts
      

      , and I have an Article and a Blogpost created in backend, for instance.
      If I access http://<hostname>/eng/Comments/Article-with-comments
      Disqus is loaded.
      But if I try to access the blogpost:
      http://<hostname>/eng/Comments/Post-without-comments
      Disqus is still being loaded and it should not, since it is defined in the settings that for a specific siteaccess access to a blogpost content, the provider is disabled ( enabled: false ), so it seems that after the settings merge, the origin of rulesets aren't being taken into account.

        Activity

        Hide
        Marcos Loureiro (Inactive) added a comment -

        As far as I could understood after the merge the content_comments settings will look something like:

        ez_commetns.system.eng.content_comments:
            article_ruleset:
                enabled: true
                match:
                    Identifier\Contenttype:
                        - article
                        - blog_posts
            blog_post:
                enabled: false
                match:
                    Identifier\Contenttype:
                        - blog_post

        And it looks that the first match found to the object will be used, in this case it will match blog_post from the article_ruleset first so it displays the comments.

        Show
        Marcos Loureiro (Inactive) added a comment - As far as I could understood after the merge the content_comments settings will look something like: ez_commetns.system.eng.content_comments: article_ruleset: enabled: true match: Identifier\Contenttype: - article - blog_posts blog_post: enabled: false match: Identifier\Contenttype: - blog_post And it looks that the first match found to the object will be used, in this case it will match blog_post from the article_ruleset first so it displays the comments.

          People

          • Assignee:
            Unassigned
            Reporter:
            Rui Silva (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: