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]
  • #16 / Aug 11, 2010 8:46am

    Andrew Weaver

    206 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 think

    SELECT DISTINCT t.entry_id
    FROM exp_weblog_titles t
    WHERE t.entry_id NOT IN
    (SELECT d.entry_id FROM exp_weblog_data d);

    will show all entry id’s in exp_weblog_titles that are not in the data table.

    Andrew

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

    Mark Bowen

    12637 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.

    Yep I believe there is but I’m using pagination so I don’t think that’s it. I think that limit only comes into effect when you are trying to show a lot of entries on one page which I’m not doing. I know the internal weblog tag limit is 100 and then you can use pagination or make that limit higher using the limit=”“ parameter but that’s not it unfortunately :-(

    If I hard code the weblog tag to show just that entry_id or url_title then I don’t get any results but that entry 100% exists in the database and shows as open and the correct weblog.

    Best wishes,

    Mark

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

    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 think

    SELECT DISTINCT t.entry_id
    FROM exp_weblog_titles t
    WHERE t.entry_id NOT IN
    (SELECT d.entry_id FROM exp_weblog_data d);

    will show all entry id’s in exp_weblog_titles that are not in the data table.

    Andrew

    Thanks Andrew. Nope I was wrong as that query came back with no results so seems as though they are all correct.

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

    Andrew Weaver

    206 posts

    Also, the weblog tag will also join onto the member tables exp_members and exp_member_data.

    Do all the authors exist?

    Andrew

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

    moonbeetle

    81 posts

    SELECT COUNT(wt.entry_id) as my_count 
    FROM exp_weblog_data wd, exp_weblog_titles wt 
    WHERE wd.weblog_id = wt.weblog_id 
    AND wt.entry_id = wd.entry_id 
    AND wd.weblog_id = 4
    AND wt.status = 'open'
    
    
    SELECT COUNT(*) as my_count FROM exp_weblog_titles
    WHERE weblog_id = 4
    AND status = 'open'

    Both queries should give you the exact same number, if not then there is data corruption in your database.

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

    Mark Bowen

    12637 posts

    Also, the weblog tag will also join onto the member tables exp_members and exp_member_data.

    Do all the authors exist?

    Andrew

    I’m not too sure. It might indeed be that as it seems as though the database has somehow been rolled back so it might be that they indeed don’t exist.

    Is there some easy way of finding that out?

    Best wishes,

    Mark

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

    Mark Bowen

    12637 posts

    SELECT COUNT(wt.entry_id) as my_count 
    FROM exp_weblog_data wd, exp_weblog_titles wt 
    WHERE wd.weblog_id = wt.weblog_id 
    AND wt.entry_id = wd.entry_id 
    AND wd.weblog_id = 4
    AND wt.status = 'open'
    
    
    SELECT COUNT(*) as my_count FROM exp_weblog_titles
    WHERE weblog_id = 4
    AND status = 'open'

    Both queries should give you the exact same number, if not then there is data corruption in your database.

    Yep both the same.

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

    Mark Bowen

    12637 posts

    Quick update I think I got my numbers mixed up before but it looks like 199 entries aren’t showing on the site as there are 1088 open entries on the site but using the paginated weblog tag that shows absolute_count only goes up to 889.

    I don’t think that helps at all but just thought I’d mention it.

    Any moderators out there? I can give a login to the site if required.

    Best wishes,

    Mark

  • #24 / Aug 11, 2010 9:05am

    Mark Bowen

    12637 posts

    Not sure if this was the correct query to run but tried this :

    SELECT *
    FROM exp_weblog_titles wt
    LEFT JOIN exp_members wd
    ON wt.author_id = wd.member_id
    WHERE wt.weblog_id = 4

    That came up with 1117 which is the correct amount of entries in that weblog.

  • #25 / Aug 11, 2010 9:14am

    Mark Bowen

    12637 posts

    Everyone hold your horses I might know what it is although I’m totally at a loss if it is this as to how it’s happened.

    Will update once I’ve checked out my suspicions.

  • #26 / Aug 11, 2010 9:18am

    Mark Bowen

    12637 posts

    Yep!! 😊

    I’m using the Super Search module from Solspace on the site and somehow show_expired=“yes” has shown up in the search results tag.

    Now obviously when I click on one of the results it takes me to the single entry page and these expired results won’t show anything.

    Therefore everything appears to be back to normal now although I’d really like to know how those got added in there as they’ve not been there before.

    Thanks everyone for all the help on this one, I was going completely crazy out of my mind with this.

    Best wishes,

    Mark

  • #27 / Aug 11, 2010 4:42pm

    Ingmar

    29245 posts

    Glad to see you got to the bottom of this, Mark 😊

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

ExpressionEngine News!

#eecms, #events, #releases