Re: [rt-users] CustomFields table problems after upgrade to 4.2.1. (column repeated referenced after upgrade)

2013-11-27 Thread Alex Vandiver
On Wed, 2013-11-27 at 13:35 +0100, Budsjö, Martin wrote:
 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




[rt-users] CustomFields table problems after upgrade to 4.2.1. (column repeated referenced after upgrade)

2013-11-26 Thread Budsjö, Martin
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 

Re: [rt-users] CustomFields table problems after upgrade to 4.2.1. (column repeated referenced after upgrade)

2013-11-26 Thread Alex Vandiver
On Tue, 2013-11-26 at 11:30 +0100, Budsjö, Martin wrote:
 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