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.

Database error when creating new MSM site

March 07, 2011 12:30pm

Subscribe [2]
  • #1 / Mar 07, 2011 12:30pm

    guru24

    40 posts

    I’m getting the following error with EE2.1.3 20101220 / MSM2.0 20101215, previously upgraded from 1.7.

    I am adding a fourth site and not copying or moving anything from the other sites, all of which have been working fine for a while. Comments are not used in any of the sites.

    Error Number: 1054
    
    Unknown column 'channel_id' in 'where clause'
    
    SELECT COUNT(comment_id) as count FROM (`exp_comments`) WHERE `status` = 'o' AND `channel_id` = 0
    
    Filename: libraries/Stats.php
    
    Line Number: 469

    The new site appears to have been created but I can’t be sure there isn’t a problem lurking somewhere. Hosting environment is local MAMP.

    Can I trust the new site to work with or does it need creating without an error? Anything else I can check?

  • #2 / Mar 07, 2011 5:05pm

    Ingmar

    29245 posts

    Please re-upload a fresh set of both EE and the MSM, there might be some file corruption here. How many addition sites does your copy of the MSM allow?

  • #3 / Mar 07, 2011 6:30pm

    guru24

    40 posts

    Refreshed all EE files - same error. But, problem fixed…

    After digging around a bit more I figured out that EE was attempting to update comment stats - although comments have never been used on any of the sites and the comment module was not installed, the comment tables were still present in the database (and empty). I tried installing/uninstalling the comment module but that threw an error too - because the comment table already existed…

    So, I manually deleted the comment tables and everything seems to be working now, new site created without error.

    It looks like there needs to be a bit more checking in a few places (install comment module, update comments stats) to trap this scenario before an unrecoverable error is thrown.

    Not sure how or why the comment tables were there when they shouldn’t have been. Does this need reporting as a bug?

  • #4 / Mar 08, 2011 4:03am

    John Henry Donovan

    12339 posts

    guru24,

    Glad you got is sorted. Yes there was a bug or two that came from presuming the comment module was installed. I can’t find them specifically in our tracker right now.

    A lot has been fixed in our beta release.

    Can you go ahead and create a bug report as it is pretty specific, thanks.

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

ExpressionEngine News!

#eecms, #events, #releases