[Solved] News Articles Disappearing

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
gsexton
New Member
New Member
Posts: 6
Joined: Mon Sep 12, 2011 5:47 pm

[Solved] News Articles Disappearing

Post by gsexton »

A customer has been using CMSMS 1.9.4.1. The server is running OpenSUSE 11.4 with the following software:

Apache: 2.2.17
MySql: 5.1.53
PHP: 5.3.5

He contacted me because he states that articles from the news section are disappearing.

He states:

I will post a review with the back end tool and everything will be fine for a few days or even a week and then all of the sudden the review(s) will disappear.


Additionally he adds:

At one point we tried to make the site URL Friendly but it did not work so we deleted the changes that were made. Looking back on now it it seems that the reviews started to disappear shortly after we tried to make that change. I can't think of anything else that happened.


but this may be extraneous.

The articles appear in the Content/News section. However, if you try to click on one of the news articles it takes you to a blank edit screen. I checked the database and found that for the articles with the problem, there are no entries in cms_module_news. For example, an article appears in the news list. Looking at the URL, the article id is 216. Looking at cms_module_news, there is no article with news_id=216. A similar article 219 is present in the db and works correctly.

I've upgraded the customer to 1.9.4.3. My question is this: Is the kind of corruption that I'm seeing related to the fix in 1.9.4.3?

If not, any ideas on what to look at?

Also, can someone point me to the appropriate table to clean up the bad entries? It looks like a table is keeping references to the cms_module_news table entries but I don't know the schema and I'm not seeing any obvious candidates.
Last edited by gsexton on Wed Sep 14, 2011 7:15 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News Articles Disappearing

Post by calguy1000 »

At one point we tried to make the site URL Friendly but it did not work so we deleted the changes that were made. Looking back on now it it seems that the reviews started to disappear shortly after we tried to make that change. I can't think of anything else that happened.
Do a system verification to make sure that none of the 'changes' you made to the site are still there. If you have verification problems re-copy the effected files overtop until everything verifies properly.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
gsexton
New Member
New Member
Posts: 6
Joined: Mon Sep 12, 2011 5:47 pm

Re: News Articles Disappearing

Post by gsexton »

The original developer did not create a checksum file.
gsexton
New Member
New Member
Posts: 6
Joined: Mon Sep 12, 2011 5:47 pm

Re: News Articles Disappearing

Post by gsexton »

I'm not the original developer, so I don't have access to the checksums.
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: News Articles Disappearing

Post by spcherub »

Any chance the database was restored from backup either intentionally by someone or by the hosting provider? If the tables were overwritten by an older backup, you could lose information as you have described.

Also I may be wrong, but you can use the checksum information that is available in the downloads section of the CMSMS site - find the one that is specific to the version you are using. Running a verification will allow you to compare your current installation with the original distribution.

-S
gsexton
New Member
New Member
Posts: 6
Joined: Mon Sep 12, 2011 5:47 pm

Re: News Articles Disappearing

Post by gsexton »

I'm sure it's a scratch installation. The DB should have been created from scratch. If it had been restored, shouldn't it have been self-consistent?

I did a diff of a new 1.9.4.3 directory with my existing directory. The only difference is that one of the templates has some menu code uncommmented. In short, the PHP looks perfectly stock.

Anyhow, any ideas on where the related tables are so I can get the DB cleaned up?
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: News Articles Disappearing

Post by spcherub »

You are right about the DB being self-consistent if restored from a backup.

The tables related to News are the following:
cms_module_news
cms_module_news_categories
cms_module_news_categories_seq
cms_module_news_fielddefs
cms_module_news_fieldvals
cms_module_news_seq

Hope that helps.

-S
gsexton
New Member
New Member
Posts: 6
Joined: Mon Sep 12, 2011 5:47 pm

Re: News Articles Disappearing

Post by gsexton »

Not really. If the record is showing in the News page list, and it doesn't exist in cms_module_news, then there's some other table that's referencing the article #. Otherwise, where would that display come from?

As I said above, I'm seeing articles on the News page with no corresponding entry in the cms_module_news table. So, something else has a pointer to it but the pointer's broken.

Does anyone understand the schema?
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: News Articles Disappearing

Post by spcherub »

AFAIK the tables are listed are the ones used by the News module. There should not be references to new articles in any other table, otherwise the module cannot be standalone (as it is today). The list of News articles comes from the table cms_module_news.

This may be a stretch but have you tried emptying your browser cache, logging back into the admin and see if the list of Articles in the Content > News section has changed?

Also make sure that the list of tables matches up with the list I posted earlier. This is make sure that the previous coder did not create his own version of the cms_module_news table, but did not update the underlying code for consistency.

-S
gsexton
New Member
New Member
Posts: 6
Joined: Mon Sep 12, 2011 5:47 pm

Re: News Articles Disappearing

Post by gsexton »

OK, the problem is that the indexes on the table were corrupted.

I used the MySQL command: check table module_cms_news extended; to verify this, and when it reported the error I used the MySQL command "repair table module_cms_news;" to repair it.

The problem is the customer has rotten power and won't keep his UPS equipment working.
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: News Articles Disappearing

Post by spcherub »

Thanks for the update - please add [SOLVED] to the original posting subject line.

S
Post Reply

Return to “CMSMS Core”