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.

Entries exist but don't show on site! :-(

August 11, 2010 7:04am

Subscribe [4]
  • #1 / Aug 11, 2010 7:04am

    Mark Bowen

    12637 posts

    Hiya,

    Just wondering if someone can tell me where I’m going wrong on this. Unfortunately a client site somehow got rolled back to an earlier database backup and now all kinds of weird problems are happening. Most are due to templates not existing but I’m re-creating those now.

    The main problem I have though is that some entries are not showing up at all. If I create the most standard of weblog entry tags just to show the title of the entry upon going to the page then nothing shows. If I place in an {if no_results}Nothing to see here{/if} variable then that shows up however there is most definitely a weblog entry with the entry_id / url_title that I am trying to view and if I click on the entry in the Edit screen then it is definitely there and the content shows up in the admin panel and the entry is open.

    Please please please help as I’m thoroughly confused as to what has happened here! :-(

    Best wishes,

    Mark

  • #2 / Aug 11, 2010 7:49am

    moonbeetle

    81 posts

    If you turn on the debugger/profiler and check the SQL statements, does that help discovering why certain entries don’t show up?

  • #3 / Aug 11, 2010 7:50am

    Mark Bowen

    12637 posts

    Okay quick update I made the weblog entry tag like this :

    {exp:weblog:entries weblog="my_weblog"}
    {entry-id} - {title}
    
    
    {/exp:weblog:entries}

    I also have a set of paginate tags in there to see all the entries.

    Following back with the database along with what is output using this template I can see that entry_id’s from 2459 - 2660 are missing on that template! There are actually only around 138 entries that are in this weblog as there is more than one weblog in the site so the entry_ids are obviously not consecutive but these 138 entries don’t show up on that template!! :-(

    Anyone any ideas?

    Best wishes,

    Mark

  • #4 / Aug 11, 2010 7:51am

    Mark Bowen

    12637 posts

    If you turn on the debugger/profiler and check the SQL statements, does that help discovering why certain entries don’t show up?

    I’ve just turned it on although to tell the truth I’m not too sure what I would be looking for?

  • #5 / Aug 11, 2010 7:56am

    moonbeetle

    81 posts

    Think you should try to isolate first if it’s a template problem or a database corruption problem. Create a fresh template and pull in all entries from that one weblog that’s giving problems, without pagination. Count the number of results.

  • #6 / Aug 11, 2010 7:58am

    Mark Bowen

    12637 posts

    Think you should try to isolate first if it’s a template problem or a database corruption problem. Create a fresh template and pull in all entries from that one weblog that’s giving problems, without pagination. Count the number of results.

    I’ve done that as shown above. Just a really really simple weblog tag pulling entries in. Problem I have though is there are over 1000 entries in that one weblog so I’m unable to show them all without using pagination and the problems are further down in the entries so they won’t show up unless I paginate.

  • #7 / Aug 11, 2010 7:59am

    Mark Bowen

    12637 posts

    I’ve performed a statistics recount and the numbers showing there are the same as I have for exp_weblog_titles and exp_weblog_data so hopefully all is correct there.

  • #8 / Aug 11, 2010 8:01am

    Mark Bowen

    12637 posts

    Just ran a sql query on the template and came up with the correct amount of entries so not really too sure what’s going on :-(

  • #9 / Aug 11, 2010 8:03am

    Mark Bowen

    12637 posts

    Brought up the Edit page and counted how many entries there are there and there are 1117 exactly the same as the sql query in the template gives me and the same as using Sequel Pro for that weblog.

    Everything looks the same everywhere but it’s just that some entries won’t show up :-(

  • #10 / Aug 11, 2010 8:03am

    moonbeetle

    81 posts

    Okay, some obvious things then…. so the entry_id’s that are giving problems are within the range 2459 - 2660. When you verify the weblog_id and status for those entries, they belong to the weblog? Their status is set to Open ?

  • #11 / Aug 11, 2010 8:11am

    Mark Bowen

    12637 posts

    Okay, some obvious things then…. so the entry_id’s that are giving problems are within the range 2459 - 2660. When you verify the weblog_id and status for those entries, they belong to the weblog? Their status is set to Open ?

    Yep, correct weblog and status is open. I’ve just updated the weblog tag to this instead :

    {exp:query sql="
    
    SELECT COUNT(*) as my_count FROM exp_weblog_titles
    WHERE weblog_id = 4
    AND status = 'open'
    
    "}
    COUNT - {my_count}
    
    {/exp:query}
    
    <hr >
    
    {exp:weblog:entries weblog="my_weblog" show_future_entries="yes" show_expired="yes" dynamic="off" paginate="bottom" sort="asc" status="open"}
    {if no_results}Aggghhh!!{/if}
    {absolute_count} - {entry_id} - {title}
    
    
    
    {if count == total_results}<hr >{/if}
    {paginate}
    Page {current_page} of {total_pages} pages {pagination_links}
    {/paginate}
    
    {/exp:weblog:entries}

    The query at the top of the page shows 1088 results. The weblog tag only goes up to 889 :-( I’m really quite confused now.

  • #12 / Aug 11, 2010 8:25am

    moonbeetle

    81 posts

    The weblog entries tag pulls date from several tables: exp_weblog_titles, exp_weblog_fiedsand exp_weblog_data. You’re SQL query test should do the same to be able to have a better comparison.

  • #13 / Aug 11, 2010 8:35am

    Mark Bowen

    12637 posts

    The weblog entries tag pulls date from several tables: exp_weblog_titles, exp_weblog_fiedsand exp_weblog_data. You’re SQL query test should do the same to be able to have a better comparison.

    How do you mean, do the same?

    Best wishes,

    Mark

  • #14 / Aug 11, 2010 8:36am

    Mark Bowen

    12637 posts

    Also is there an easy SQL query that I can run to see if all the entry_id’s in the exp_weblog_data and exp_weblog_titles tables are the same. I’ve a weird feeling they might possibly not be lining up somewhere.

    Best wishes,

    Mark

  • #15 / Aug 11, 2010 8:43am

    Simon Cox

    405 posts

    Problem I have though is there are over 1000 entries in that one weblog

    Mark - isn’t there a hidden limit on how many entries will show? I think it may be 1000.

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

ExpressionEngine News!

#eecms, #events, #releases