CustomFields table problems after upgrade to 4.2.1. (column repeated referenced after upgrade)

Hi,

I tried to upgrade from 4.0.17 to 4.2.1 the other day and no matter what I do, I get the same result. After upgrading I can login without any problem and all lists of tickets and graphs etc looks good. (By the way, I really like the updates to the menus!)

But if I open a ticket, it looks like the query builder is generating SQL using the “repeated” column of the CustomFields table, and that column was removed during the 4.1.11 upgrade process.

My first reaction to this was to make sure the Mason object cache was deleted, but I’ve issued the rm command for that so many times now my fingers bleeds. I also tried doing the upgrade without any plugins and also a complete fresh install of the files (using make install instead of update). Still the same result.

Please find the example of a log entry for this problem at the bottom.

Has anyone seen this before? Any remedy?

Cheers,

Martin

Logile:

[25564] [Tue Nov 26 08:34:58 2013] [warning]: DBD::Pg::st execute failed: ERROR: column main.repeated does not exist

LINE 1: …name, main.type, main.rendertype, main.maxvalues, main.repea…

                                                         ^ at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 589. (/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:589)

[25564] [Tue Nov 26 08:34:58 2013] [warning]: RT::Handle=HASH(0x7f393a4fd258) couldn’t execute the query 'SELECT main.* FROM CustomFields main JOIN ObjectCustomFields ObjectCustomFields_1 ON ( ObjectCustomFields_1.CustomField = main.id ) WHERE (ObjectCustomFields_1.ObjectId = ‘7’ OR ObjectCustomFields_1.ObjectId = ‘0’) AND (main.Disabled = ‘0’) AND (main.LookupType = ‘RT::Queue-RT::Ticket’) AND (main.id = ‘0’) GROUP BY main.id, main.name, main.type, main.rendertype, main.maxvalues, main.valuesclass, main.basedon, main.pattern, main.lookuptype, main.description, main.sortorder, main.creator, main.created, main.lastupdatedby, main.lastupdated, main.disabled, main.id, main.name, main.type, main.rendertype, main.maxvalues, main.repeated, main.valuesclass, main.basedon, main.pattern, main.lookuptype, main.description, main.sortorder, main.creator, main.created, main.lastupdatedby, main.lastupdated, main.disabled ORDER BY MIN(ObjectCustomFields_1.SortOrder) ASC ’ at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 602.

                         DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH(0x7f393a4fd258)', 'SELECT main.* FROM CustomFields main JOIN ObjectCustomFields ...') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 239

                         DBIx::SearchBuilder::_DoSearch('RT::CustomFields=HASH(0x7f393b13aa38)') called at /opt/bestpractical/rt-4.2.1/sbin/../lib/RT/SearchBuilder.pm line 990

                         RT::SearchBuilder::_DoSearch('RT::CustomFields=HASH(0x7f393b13aa38)') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 507

                         DBIx::SearchBuilder::Next('RT::CustomFields=HASH(0x7f393b13aa38)') called at /opt/bestpractical/rt-4.2.1/sbin/../lib/RT/CustomFields.pm line 386

                         RT::CustomFields::Next('RT::CustomFields=HASH(0x7f393b13aa38)') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 568

                         DBIx::SearchBuilder::First('RT::CustomFields=HASH(0x7f393b13aa38)') called at /opt/bestpractical/rt-4.2.1/share/html/Elements/ShowCustomFields line 92

                         HTML::Mason::Commands::__ANON__('Object', 'RT::Ticket=HASH(0x7f393ae2c130)', 'Grouping', 'Links', 'Table', 0) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393af086a0)', 'Object', 'RT::Ticket=HASH(0x7f393ae2c130)', 'Grouping', 'Links', 'Table', 0) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, 'Object', 'RT::Ticket=HASH(0x7f393ae2c130)', 'Grouping', 'Links', 'Table', 0) called at /opt/bestpractical/rt-4.2.1/share/html/Elements/ShowLinks line 64

                         HTML::Mason::Commands::__ANON__('Object', 'RT::Ticket=HASH(0x7f393ae2c130)') called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393b12d030)', 'Object', 'RT::Ticket=HASH(0x7f393ae2c130)') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, 'Object', 'RT::Ticket=HASH(0x7f393ae2c130)') called at /opt/bestpractical/rt-4.2.1/share/html/Ticket/Elements/ShowSummary line 95

                         HTML::Mason::Commands::__ANON__() called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1383

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1383

                         HTML::Mason::Request::content('RT::Interface::Web::Request=HASH(0x7f393a77d978)') called at /opt/bestpractical/rt-4.2.1/share/html/Widgets/TitleBox line 56

                         HTML::Mason::Commands::__ANON__('title', 'Links', 'title_href', '/rt/Ticket/ModifyLinks.html?id=13924', 'class', 'ticket-info-links', 'titleright_raw', '<a href="/rt/Ticket/Graphs/index.html?id=13924">Graph</a>') called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393aaa98e0)', 'title', 'Links', 'title_href', '/rt/Ticket/ModifyLinks.html?id=13924', 'class', 'ticket-info-links', 'titleright_raw', '<a href="/rt/Ticket/Graphs/index.html?id=13924">Graph</a>', ...) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, undef, 'title', 'Links', 'title_href', '/rt/Ticket/ModifyLinks.html?id=13924', 'class', 'ticket-info-links', ...) called at /opt/bestpractical/rt-4.2.1/share/html/Ticket/Elements/ShowSummary line 97

                         HTML::Mason::Commands::__ANON__('Ticket', 'RT::Ticket=HASH(0x7f393ae2c130)', 'Attachments', 'RT::Attachments=HASH(0x7f393ae292d8)') called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f39396a8950)', 'Ticket', 'RT::Ticket=HASH(0x7f393ae2c130)', 'Attachments', 'RT::Attachments=HASH(0x7f393ae292d8)') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, 'Ticket', 'RT::Ticket=HASH(0x7f393ae2c130)', 'Attachments', 'RT::Attachments=HASH(0x7f393ae292d8)') called at /opt/bestpractical/rt-4.2.1/share/html/Ticket/Display.html line 62

                         HTML::Mason::Commands::__ANON__() called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1383

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1383

                         HTML::Mason::Request::content('RT::Interface::Web::Request=HASH(0x7f393a77d978)') called at /opt/bestpractical/rt-4.2.1/share/html/Widgets/TitleBox line 56

                         HTML::Mason::Commands::__ANON__('title', 'Ticket metadata') called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393aaa98e0)', 'title', 'Ticket metadata') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, undef, 'title', 'Ticket metadata') called at /opt/bestpractical/rt-4.2.1/share/html/Ticket/Display.html line 63

                         HTML::Mason::Commands::__ANON__('id', 13924) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393ad2cfd0)', 'id', 13924) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, undef, 'id', 13924) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 958

                         HTML::Mason::Request::call_next('RT::Interface::Web::Request=HASH(0x7f393a77d978)') called at /opt/bestpractical/rt-4.2.1/share/html/Ticket/autohandler line 66

                         HTML::Mason::Commands::__ANON__('id', 13924) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393ae15650)', 'id', 13924) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1305

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, undef, 'id', 13924) called at /opt/bestpractical/rt-4.2.1/sbin/../lib/RT/Interface/Web.pm line 680

                         RT::Interface::Web::ShowRequestedPage('HASH(0x7f393a5737d8)') called at /opt/bestpractical/rt-4.2.1/sbin/../lib/RT/Interface/Web.pm line 368

                         RT::Interface::Web::HandleRequest('HASH(0x7f393a5737d8)') called at /opt/bestpractical/rt-4.2.1/share/html/autohandler line 53

                         HTML::Mason::Commands::__ANON__('id', 13924) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 138

                         HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f393a5ff5d0)', 'id', 13924) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1300

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295

                         HTML::Mason::Request::comp(undef, undef, undef, 'id', 13924) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 484

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 484

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 436

                         HTML::Mason::Request::exec('RT::Interface::Web::Request=HASH(0x7f393a77d978)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 85

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 85

                         HTML::Mason::Request::PSGI::exec('RT::Interface::Web::Request=HASH(0x7f393a77d978)') called at /usr/local/share/perl5/HTML/Mason/Interp.pm line 345

                         HTML::Mason::Interp::exec(undef, undef, 'id', 13924) called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 48

                         eval {...} called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 48

                         HTML::Mason::PSGIHandler::invoke_mason('HTML::Mason::PSGIHandler::Streamy=HASH(0x7f393964fe48)', 'HTML::Mason::FakeApache=HASH(0x7f393acd4710)', 'HASH(0x7f393a776148)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm line 52

                         HTML::Mason::PSGIHandler::Streamy::__ANON__('CODE(0x7f393acd65e0)') called at /opt/bestpractical/rt-4.2.1/sbin/../lib/RT/Interface/Web/Handler.pm line 307

                         RT::Interface::Web::Handler::__ANON__('CODE(0x7f393acd65e0)') called at /usr/local/share/perl5/Plack/Util.pm line 302

                         Plack::Util::__ANON__('CODE(0x7f393aa03918)') called at /usr/local/share/perl5/Plack/Handler/Apache2.pm line 89

                         Plack::Handler::Apache2::call_app('Plack::Handler::Apache2', 'Apache2::RequestRec=SCALAR(0x7f393abaea18)', 'CODE(0x7f3939666678)') called at /usr/local/share/perl5/Plack/Handler/Apache2.pm line 126

                         Plack::Handler::Apache2::handler('Apache2::RequestRec=SCALAR(0x7f393abaea18)') called at -e line 0

                         eval {...} called at -e line 0 (/usr/local/share/perl5/Carp.pm:103)

Confidentiality Notice: This message is private and may contain confidential and proprietary information. If you have received this message in error, please notify us and remove it from your system and note that you must not copy, distribute or take any action in reliance on it. Any unauthorized use or disclosure of the contents of this message is not permitted and may be unlawful.

I tried to upgrade from 4.0.17 to 4.2.1 the other day and no matter
what I do, I get the same result. After upgrading I can login without
any problem and all lists of tickets and graphs etc looks good. (By
the way, I really like the updates to the menus!)

But if I open a ticket, it looks like the query builder is generating
SQL using the “repeated” column of the CustomFields table, and that
column was removed during the 4.1.11 upgrade process.

Hm – do you also have RT4.0 tables in a different tablespace or
something? RT attempts to inspect the database’s list of existent
columns to determine which columns are available to GROUP BY.

  • Alex

Thanks a lot! I did have a extra RT4test schema… I did drop that
yesterday, but for once I did not rm the mason cache. I did this after
reading your reply and now it works perfectly! Thanks again! You saved
our upgrade plan for the weekend.

Please keep replies on-list, so others can benefit from what you
discover. Glad to hear that fixed things.

  • Alex