We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51020
    • 670 Posts
    I have installed articles using the default templates but the home page of the blog is empty. It's supposed to show a summary of latest posts by default!
    Anyone have any tips?

    I have [[+articles]] in the body.

    Andy
      • 3749
      • 24,544 Posts
      Do you have this?

      [[*content]]


      Also, you can try

      [[+latest_posts]]


      Do you have the latest version of Articles? In earlier versions, this is an issue:

      http://bobsguides.com/blog.html/2013/05/22/dude,-wheres-my-article-disappearing-articles/
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 51020
        • 670 Posts
        Thanks bob!

        Yes I have [[*content]] in my articles container template.
        Funnily enough, I also have [[*latest_posts]] in my sidebar, and that's working fine - brings in the title of the latest posts.
        It's just the body which isn't being populated.

        It should be the latest version as I only installed it this week.

        One thing I'm wondering is this. I originally created a normal resource called blog. Then right clicked to create my articles container, but this put my actual blog inside the original resource I created (so I had blog inside blog if that makes sense?).
        I manually dragged it into the top level of my resource tree - could that have broken it?
        I just didn't want it nested - but couldn't see any other way to create my articles container.


        Have I broken it??'


        Andy
          • 51020
          • 670 Posts
          Furthermore , all my articles are visible and working - if I click on any of the latest posts the all work as expected - it's just the home page of the blog which is empty.

            • 3749
            • 24,544 Posts
            Articles does some stuff when you first install it and again when you create the container. My wild guess is that it's setting the parent of the blog posts to the wrong container, or something similar.

            On the Manage Articles page, check the "Uses Template" field on the "Templates" tab to make sure it's using the correct template.


            Are you creating your blog posts by right-clicking on the container and selecting "Manage Articles", then clicking on New Article? If not, try that.

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 51020
              • 670 Posts
              Thanks I will check. I think it's the patent thing you mentioned. I'm creating articles within the container itself but they are all visible and working fine.

                • 51020
                • 670 Posts
                Ok - so I have started over with this.

                I used the default templates to ensure no templating errors by me - but still there is nothing on the home page of my blog apart from the sidebar which contains latest posts and archive.

                I don't understand what is going on.
                • I have the latest version of Articles
                • My Article container template contains [[*content]]
                • The content field within the template tab contains:

                [[+articles]]

                [[!+page.nav:notempty=`
                <div class='paging'>
                <ul class='pageList'>
                [[+paging]]
                </ul>
                </div>
                `]]

                Any ideas anyone?
                Or is there an alternative I should use for blogging? (although I hate giving up!) [ed. note: tm2000 last edited this post 11 years, 1 month ago.]
                  • 3749
                  • 24,544 Posts
                  As I mentioned above, double-check the templates at the top of the Templates tab in Manage Articles. The one on the left should be the container template, not the article template.

                  Try creating an Article by right-clicking on the Articles container and selecting "Manage Articles," then click on the "New Article" button. See if the new article shows up. You'll also see if the existing articles show in "Manage Articles."

                  You might look in the DB in PhpMyAdmin. Check the modx_site_content table. If you sort by class_key, the articles will come to the top. See if the parent field of the articles matches the ID of the Articles container document you're using.

                  As a last resort, I would uninstall and remove Articles and delete all the containers you've created. Then re-download and re-install it and create the container in the MODX root. You'd lose any articles you've created, but it would be a fresh start.

                  The Articles uninstall used to be pretty ugly and incomplete, but I think that's been corrected in later versions.

                  If all that fails, some people use the Collections extra for blogging, though I think it's more complicated to set up. A recent addition is BlogIt, which uses Collections to create a blog. I've never used it.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 51020
                    • 670 Posts
                    Thanks so much for your time and input. As you can tell
                    I'm pretty new to modx but loving it do far - just had a few teething problems. I do find that working directly on the web server to be more reliable than working on my laptop via mamp

                    I'll give your suggestions a go.

                    Thanks again
                    Andy
                      • 44922
                      • 131 Posts
                      Andy, I've had something pretty similar - blank articles page but articles list showing in the manager. The work around ( and yes it is giving up, but when you've installed Articles many times before and this one just isn't playing ball, you've got to stop wasting time) is to create a container template and use a GetResources call directly on that page. Not ideal, but it works and makes the best of a bad situation.