ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

total_entries in exp_channels is not being updated

July 17, 2010 4:14pm

Subscribe [3]
  • #1 / Jul 17, 2010 4:14pm

    Wes Rice

    103 posts

    I’m having problems when I create new channel entries. I can create the entries just fine and they show up in the edit table, but sometimes they will not render on my front end.

    I looked at my database and noticed that sometimes the total_entries count in my exp_channels table is not reflecting how many entries I have in that channel.

    Attached are two screenshots. One shows the “Sample News Article” in the news channel inside the edit table. The other shows that the total_entries are off in news channel record in the database.

    I the news channel was created in 1.6.8. I also had the same problem with the pages channel, which I created in 2.1.0. I also noticed that sometimes the entries_total count is incremented correctly when I publish a new entry. However, if I edit that entry it will decrement the total_entries and that article will no longer show up on the front end.

    ======================

    Additional Back Story:

    I originally upgraded this site from 1.6.8 to 2.1 last night. Something happened during my upgrade and it failed. I thought I had a backup of the database, but didn’t give my folder the correct permissions that I was writing my backups to. Thus, I was left 1/2 upgrade to 2.1 from 1.6.8 with no roll-back option. It took a couple of hours of manual comparison between reading the ALTER column and DROP column queries in the update file with the database tables, but I was finally able to work around the stumbling block and finished the update. However, I’m not quite sure what I worked around.

    Ideally, I would like to migrate only my channel structures, channel data, and upload preferences to a new installation. However, I don’t know what parts of the database I would need to export to accomplish this. I’m afraid I might forget to pull a table
    and ruin a relationship or something. So far, this has been the only issue that I have not been able to figure out and everything as ran smoothly.

  • #2 / Jul 18, 2010 3:41pm

    Greg Salt

    3988 posts

    Hi lockwesmonster,

    The two screenshots won’t necessarily indicate that the data is incorrect because entries are assigned an auto-incrementing id as they are created. If some are subsequently deleted then the entry ids won’t be renumbered to reflect the exact number of entries in the DB.

    I the news channel was created in 1.6.8. I also had the same problem with the pages channel, which I created in 2.1.0. I also noticed that sometimes the entries_total count is incremented correctly when I publish a new entry. However, if I edit that entry it will decrement the total_entries and that article will no longer show up on the front end.

    Please confirm that the news channel has a status group applied to it.

    Cheers

    Greg

  • #3 / Jul 19, 2010 9:49am

    Wes Rice

    103 posts

    My problem ended up being the documented bug of the date fieldtype changing the entry date to a future time. It is fixed now.

  • #4 / Jul 19, 2010 4:53pm

    Ingmar

    29245 posts

    I am very glad to hear that. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases