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 - Unknown Column "M" in 'field list'

June 15, 2012 2:48pm

Subscribe [1]
  • #1 / Jun 15, 2012 2:48pm

    bryantAXS

    50 posts

    I was trying to create a new Channel and ended up with this big error.  Not quite sure how to debug it. 

    A Database Error Occurred
    Error Number: 1054
    
    Unknown column 'M' in 'field list'
    
    UPDATE `exp_channels` SET `channel_id` = '15', `channel_title` = 'Artwork Galleries', `channel_name` = 'artwork_galleries', `channel_description` = '', `channel_lang` = 'en', `channel_url` = 'http://marwen.org/', `comment_url` = '', `search_results_url` = '', `ping_return_url` = '', `rss_url` = '', `live_look_template` = '0', `deft_status` = 'open', `deft_category` = '', `deft_comments` = 'y', `search_excerpt` = '56', `channel_html_formatting` = 'all', `channel_allow_img_urls` = 'y', `channel_auto_link_urls` = 'y', `enable_versioning` = 'n', `max_revisions` = '10', `channel_notify` = 'n', `channel_notify_emails` = '', `comment_notify` = 'n', `comment_notify_emails` = '', `comment_notify_authors` = 'n', `comment_system_enabled` = 'y', `comment_require_membership` = 'n', `comment_use_captcha` = 'n', `comment_require_email` = 'y', `comment_moderate` = 'n', `comment_max_chars` = '5000', `comment_timelock` = '0', `comment_expiration` = '0', `comment_text_formatting` = 'xhtml', `comment_html_formatting` = 'safe', `comment_allow_img_urls` = 'n', `comment_auto_link_urls` = 'y', `show_button_cluster` = 'y', `default_entry_title` = '', `url_title_prefix` = '', `M` = 'channel_edit' WHERE channel_id=15
    
    Filename: controllers/cp/admin_content.php
    
    Line Number: 761

    Running EE 2.5.2
    Lots of Modules + Extensions

    UPDATE:
    Disabled Extensions and still was seeing the problem.  Looks like the “M” param from the query string is also in the POST data.  Not sure if it’s supposed to be there or not.  Guessing not?

  • #2 / Jun 18, 2012 10:16am

    bryantAXS

    50 posts

    Any EL folk have any suggestions?

  • #3 / Jun 18, 2012 10:42am

    Shane Eckert

    7174 posts

    Hello bryantAXS,

    I am sorry to hear you are running into this problem.

    Is this an upgrade or a new install?

    Are you able to check the Database for this column? I am not sure why it went missing, but you may be able to add it back and keep moving forward. phpMySQL is a great tool for this. Look in the exp_channels table and find channel_id 15 and see if there is such a column and what it may have held by comparing it with another channel_id.

    Please let me know if this is something you are able to check.

    Thank you,

  • #4 / Jun 18, 2012 10:48am

    bryantAXS

    50 posts

    Hey Shane, thanks for your response 😊

    No, this should not be a field within my entry and because its not it would be found in the DB.  Like I mentioned in my previous post, the “M” column is getting added to the query because the query is generated from the $_POST variables array and “M” is being found within it.  The M property within the $_POST is actually the value from the query string which seems like it shouldn’t be in the POST.  Not sure why its there?  I added a core hack to unset M before generating the query and that seemed to fix it temporarily, but I wanted to run this by you guys.

    Thanks!

    Bryant

    UPDATE: Here is the core hack that temporarily fixed the issue

    Before the update_string method is called around line 760 on admin_content.php

    if(isset($_POST['M'])){
      unset($_POST['M']);
    }
  • #5 / Jun 20, 2012 11:58am

    Shane Eckert

    7174 posts

    Hey bryantAXS,

    Gotacha.

    You are right, that method should not be in the POST.

    Your fix, while it works, it just a band aide. We should figure out what’s going on.

    Can you list out your Add-Ons?

    Thank you,

  • #6 / Jun 21, 2012 9:51am

    bryantAXS

    50 posts

    It was coming from the same core-hack as I had to implement for this threat.  Sorry!

    http://ellislab.com/forums/viewthread/219413/

  • #7 / Jun 21, 2012 5:13pm

    Shane Eckert

    7174 posts

    Hey Bryant,

    Thanks for letting me know.

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases