We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37514
    • 178 Posts
    Hi there

    I've imported Quip comments across in Articles, through the automatic tool, but they aren't displaying on the pages, or in the page edit facility.

    They are appearing elsewhere, eg in Quip, and are correctly counted in the summary on the Articles container.

    In the database, they have been correctly assigned, e.g., modx_quip_comments and modx_quip_thread point to the correct ids.

    Does anyone have an idea what might be going wrong?

    [ed. note: jim.killock last edited this post 14 years, 1 month ago.]
      • 37514
      • 178 Posts
      Bit more info, MODX reports:

      [2012-09-08 10:06:34] (ERROR @ /assets/components/articles/connector.php) [Articles] Could not find Quip Thread with thread name: blog-post-125

      Quip says the posts are named differently, e.g. blogPost125

      Within Articles blog post 125, the comments tab reports "quip.thread_err_nf"

      So it seems they are named differently in a couple of places in the database?
        • 39932
        • 483 Posts
        Not normally. Are you using the [ [Quip] ] call or [ [+latest_comments] ]? (and before anyone says anything, I'm not crying yet)
          Website: Extended Dialog Development Blog: on Extended Dialog
          Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
          Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

          Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
          • 37514
          • 178 Posts
          Hi,

          It's using all the defaults from Articles, so sample.ArticleTemplate is using:


           <div class="post-comments" id="comments">
                  [[+comments]]
                  <br />
                  <h3>Add a Comment</h3>
                  [[+comments_form]]

          Thanks!

            • 37514
            • 178 Posts
            OK, bit more digging:
            The MODX documentation says:

            the thread names that Articles gives each post automatically. It follows this format:

            article-b{page-id-of-blog}-{page-id-of-post}

            e.g. article-b12-37

            Knowing that, we can then use QuipCount inside of a getResources call to retrieve the number of comments on each post, e.g.
            [[!QuipCount? &thread=`article-b9-[[+id]]`]]



            So that's where the problem is, although I'm not sure how to resolve it.
              • 39932
              • 483 Posts
              Yes. Articles does all of its comments with Quip. So, you cen definitely use a Quip call instead. If fact that's how I manage my comments on my multiple blogs.

              The issue is that before you conform to a format, they are often in one id, when they should be in another. This is either resolved by changing the database data itself, or by discarding the comments as broken.

              My Quip call inside an Article is
                 [[!Quip? &thread=`article-b[[*parent]]-[[*id]]`]]
              


              Inside a Latest Articles Chunk, I have:
                 [[!QuipCount? &thread=`article-b[[*id]]-[[+id]]`]]
              


              The trick here is getting the place holder. This is done in Articles automatically (but is not always managed well).

              Inside the Articles Container, I have (with the other missing arguments, of course):
                  [[!getResources?
                      &tpl=`myLatestArticles`
                  ]]
              


              Doing something like this will put it into line.
                Website: Extended Dialog Development Blog: on Extended Dialog
                Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
                • 37514
                • 178 Posts
                Thanks Fuzzical logic. The issue is that a previous installation, which used a add-on MODx template, had named all the threads differently, eg blogPost123 for a page with id 123; then the import for Articles did not rename these threads.

                There may be good reason for this, I don't know, but the fix for me was to manually rename the threads in the database, and repoint the comments to the new thread names. Fiddly, but luckily I only had a couple of dozen threads and comments to move.

                No doubt there's other ways of fixing this, but it might be worth the developers thinking if there is a way of dealing with this renaming threads issue, or warning about it, it will trip some people up and it does appear to break the comments feature in Articles at least for someone new to it.