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 1054 after deleting a custom channel field

March 30, 2011 5:41am

Subscribe [1]
  • #1 / Mar 30, 2011 5:41am

    MedPro

    4 posts

    Hello,

    possibly after deleting a custom channel field, i get this error:

    A Database Error Occurred
    Error Number: 1054
    
    Unknown column 'field_id_150' in 'field list'
    
    INSERT INTO ee_channel_data (entry_id, channel_id, site_id, field_id_148, field_id_120, field_id_119, field_id_132, field_id_133, field_id_150, field_id_118, field_id_109, field_id_110, field_id_111, field_id_112, field_id_114, field_id_115, field_id_116, field_id_117, field_id_121, field_id_122, field_id_123, field_id_124, field_id_125, field_id_126, field_id_127, field_id_128, field_id_129, field_id_130, field_id_131, field_id_134, field_id_135, field_id_139, field_id_140, field_id_141, field_id_142, field_id_143, field_id_144, field_id_145, field_id_146, field_id_147, field_id_149, field_id_113, field_ft_109, field_ft_110, field_ft_111, field_ft_112, field_ft_113, field_ft_114, field_ft_115, field_ft_116, field_ft_117, field_ft_118, field_ft_119, field_ft_120, field_ft_121, field_ft_122, field_ft_123, field_ft_124, field_ft_125, field_ft_126, field_ft_127, field_ft_128, field_ft_129, field_ft_130, field_ft_131, field_ft_132, field_ft_133, field_ft_134, field_ft_135, field_ft_139, field_ft_140, field_ft_141, field_ft_142, field_ft_143, field_ft_144, field_ft_145, field_ft_146, field_ft_147, field_ft_148, field_ft_149, field_id_1, field_id_2, field_id_3, field_id_4, field_id_5, field_id_6, field_id_7, field_id_8, field_id_10, field_id_11, field_id_12, field_id_13, field_id_36, field_id_37, field_id_38, field_id_39, field_id_40, field_id_42, field_id_43, field_id_44, field_id_46, field_id_47, field_id_48, field_id_51, field_id_52, field_id_54, field_id_56, field_id_57, field_id_58, field_id_59, field_id_60, field_id_61, field_id_62, field_id_63, field_id_64, field_id_65, field_id_66, field_id_67, field_id_68, field_id_69, field_id_70, field_id_71, field_id_74, field_id_75, field_id_76, field_id_77, field_id_78, field_id_79, field_id_80, field_id_81, field_id_82, field_id_83, field_id_84, field_id_85, field_id_86, field_id_87, field_id_88, field_id_89, field_id_90, field_id_91, field_id_92, field_id_93, field_id_94, field_id_95, field_id_96, field_id_97, field_id_98, field_id_99, field_id_100, field_id_101, field_id_102, field_id_103, field_id_104, field_id_105, field_id_106, field_id_107, field_id_108, field_id_136, field_id_137, field_id_138) VALUES (192, '19', '1', '9', '1,08 (s hadicí)', '245', '2,9', '5000', '', '2,5', 'T315-S', 'Výkonná a tichá pneumatická pilka', 'Pneumatická pilka T315S je obzvláště výkonná a tichá. Je možné ji používat k řezání s běžnými úpilovými listy, je ale potřeba opilovat ozubení na části, která je upnutá v držáku pilky.\n\nK dispozici je rovněž držák nástroje pro pilování, o rozměrech 4 a 6 mm.', 'Přímočaré pilky', '', '', '', 'Přípojka', '', '', '', '', '', '', '', '', 'Ano', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'https://store.ellislab.com/asset/images/avatars/pilka-t315s.jpg', 'none', 'none', 'xhtml', 'none', 'xhtml', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
    
    Filename: libraries/api/Api_channel_entries.php
    
    Line Number: 1808

    What happened exactly is that i deleted a custom channel field while in the same time a new entry creation dialog was open in another browser tab. The concerned channel was using this custom field. Now when trying to edit this particular entry, i get the following error:

    You have tried to access a channel that does not exist.

    How can i repair this ? Im using EE 2.1.3, build 20101220

    Thank You.

  • #2 / Mar 30, 2011 4:45pm

    Sue Crocker

    26054 posts

    Hi, MedPro. You’ll need to manually edit two tables:

    exp_channel_titles
    -and-
    exp_channel_data

    to change the channel_id to something other than the value that’s in there now.

    Before you attempt this, be sure to make a backup copy of both tables, or your entire database.

    I’d suggest using PHPMyAdmin or something similar for this.

    Does that help?

  • #3 / Mar 30, 2011 5:39pm

    MedPro

    4 posts

    I dont understand what channel id i should use. I suppose i cant just use “any” number? If I change the associated channel_id, the entry will not belong to the right channel anymore, am i not right?

    The concerned entry has channel_id 19 associated with it. When i look into the table exp_channels, i can see a channel with the id 19. Table exp_channel_titles has one row with the value 19 as channel_id. Table exp_channel_data has no row with the value 19 as channel_id. Also the template which should display data from this channel, is not parsing the tags properly, displaying {field_name} on the output.

  • #4 / Mar 30, 2011 7:13pm

    Sue Crocker

    26054 posts

    Hi, MedPro. It can be any of your channel_ids, it’ll be associated to that particular channnel and you can delete the entry from inside of EE.

    Are there the same number of entries in exp_channel_titles and exp_channel_data?

  • #5 / Mar 31, 2011 5:48am

    MedPro

    4 posts

    Hi Sue, problem solved - i deleted the whole entry from the exp_channel_titles table.

    As for the answer to your question, the number of entries in exp_channel_titles and exp_channel_data was not the same - there was one entry less in exp_channel_data. Due to the error 1054, the entry could not be written into that table.

    Thank You very much for your help.

  • #6 / Mar 31, 2011 8:52am

    Sue Crocker

    26054 posts

    Glad that fixed it for you.. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases