Disappearing Articles in MODX

It’s time to create new post in your MODX Articles Blog. You right-click on your blog container in the tree and select “Write New Article.” The form to create a new blog post comes up, you spend an hour or two writing your blog post, set it as published, and click on the “Save” button. Now, you go to the front end and look at your blog. The new article is not there. You go to back to the Manager and navigate to the Manage Articles panel. It’s not there either, nor is it in the Resources tree at the left. Is all your work lost forever? What happened?

First of all, no, your work is not lost, it’s just hiding. The problem is due to a bug in Articles 1.6.5 and earlier versions. It should be fixed in later releases. If you create an articles by right-clicking in the tree, two fields of the article are set incorrectly. The class_key field, which should be set to Article, is set to modDocument and the show_in_tree field, which should be set to 0, is set to 1.

Until this bug is fixed, you should create articles from the Manage Articles panel. But what about your missing post? Here’s how to bring it back from the dead.

The fix is relatively simple:

  1. Log in to your site’s cPanel
  2. Go into PhpMyAdmin (in the Databases section)
  3. On the left, select your site’s database
  4. Find the modx_site_content table and click on its browse link
  5. Each row is a Resource. Find the missing one.
  6. Click on the Edit button for the row of your Resource
  7. Change the class_key field from modDocument to Article
  8. Change the show_in_treefield from 1 to 0
  9. Click on the “Go” button at the bottom of the page

Tip: When searching the modx_site_content table, you can click on the ID column header to sort the Resources by ID. If you click again, it will reverse the sort and your new Resource should be at or near the top.

That’s all there is to it. Your new blog post should now reappear in all its glory. Have a beer.

Until the bug is fixed, create Articles by clicking on your blog container Resource. Then, click on the “New Article” button.

[Update] This bug has been fixed in the latest version of Articles.

For more information on how to use MODX to create a web site, see my web site Bob’s Guides, or better yet, buy my book: MODX: The Official Guide.

Looking for quality MODX Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under MODX | RSS 2.0

Author Spotlight

Bob Ray

Bob Ray

I am the author of MODX: The Official Guide and over 30 MODX add-on components. I host Bob's Guides, a source of valuable information for MODX users, and I've been very active in the MODX Forums with over 14,000 posts.

One Comment on Disappearing Articles in MODX

  1. JP DeVries says:

    This bug has been fixed in this pending pull request (note it’s just a one line change in a js file)
    https://github.com/jpdevries/Articles/commit/3218b42b33309489f6ce12a8304cd91e01a084d3

Leave a Reply

Your email address will not be published. Required fields are marked *


1 + 7 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>