Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Moderator: crythias

Locked
maddog2k
Znuny newbie
Posts: 4
Joined: 22 Oct 2010, 20:10
Znuny Version: 2.4.8

Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Post by maddog2k »

Hi,

We want to upgrade our very, very old OTRS 1.3.2 (tar.gz) installation to 2.4.8
I installed 2.4.8 on a new server by RPM (CentOS 5), which happens to be the current database server for our OTRS 1.3 installation.

I took an exact copy of the current MySQL database to a test database, pointed OTRS 2.4.8 to it and ran all sql upgrade scripts
from 1.3 -> 2.0 -> 2.1 -> 2.2 -> 2.3 -> 2.4, including the corresponding .pl scripts and -post.sql upgrade scripts.

Most things looked ok.

Then I installed the FAQ module, and attempt to view our old FAQ entries.
That didn't work, it didn't show any categories.
The faq_category_group table was empty as well.

So I went to 'categories', clicked on categories to change them (give discription and assign to 'all-users').
Now these 2 categories where listed, with correct number of entries inside them.

But when I click on a category, I get an error :

ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Fri Oct 22 20:20:56 2010

Message: Need rate!

Traceback (18868):
Module: Kernel::Output::HTML::LayoutFAQ::GetFAQItemVotingRateColor (v1.7) Line: 136
Module: Kernel::Modules::FAQ::_GetExplorerItemList (v1.48) Line: 329
Module: Kernel::Modules::FAQ::GetExplorer (v1.48) Line: 150
Module: Kernel::Modules::AgentFAQ::Run (v1.33) Line: 1238
Module: Kernel::System::Web::InterfaceAgent::Run (v1.43.2.1) Line: 819
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 48
Module: (eval) (v1.88) Line: 204
Module: ModPerl::RegistryCooker::run (v1.88) Line: 204
Module: ModPerl::RegistryCooker::default_handler (v1.88) Line: 170
Module: ModPerl::Registry::handler (v1.99) Line: 31



Any assistance would be greatly appreciated :)
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Post by Wolfgangf »

Probalby you should update your faq_voting table and setting the rate field to some value (for example 100)

Code: Select all

mysql otrs

mysql> update faq_voting set rate = 100 where rate is null
or something like this
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
maddog2k
Znuny newbie
Posts: 4
Joined: 22 Oct 2010, 20:10
Znuny Version: 2.4.8

Re: Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Post by maddog2k »

Hi Wolfgang,

The table faq_voting is empty, so an update won't affect any record.
On another new db I created (clean 2.4.8), I added a faq entry succesfully and this table still is empty.

Any other hints perhaps ?

Thanks.
maddog2k
Znuny newbie
Posts: 4
Joined: 22 Oct 2010, 20:10
Znuny Version: 2.4.8

Re: Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Post by maddog2k »

Mm, this is probably causing it :

'table in upgraded db'

mysql> desc faq_item;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| f_name | varchar(200) | NO | UNI | | |
| f_language_id | smallint(6) | NO | | 0 | |
| f_subject | varchar(200) | YES | | NULL | |
| state_id | smallint(6) | NO | | 0 | |
| category_id | smallint(6) | NO | | 0 | |
| f_keywords | mediumtext | YES | | NULL | |
| f_field1 | mediumtext | YES | | NULL | |
| f_field2 | mediumtext | YES | | NULL | |
| f_field3 | mediumtext | YES | | NULL | |
| f_field4 | mediumtext | YES | | NULL | |
| f_field5 | mediumtext | YES | | NULL | |
| f_field6 | mediumtext | YES | | NULL | |
| free_key1 | varchar(80) | YES | | NULL | |
| free_value1 | varchar(200) | YES | | NULL | |
| free_key2 | varchar(80) | YES | | NULL | |
| free_value2 | varchar(200) | YES | | NULL | |
| free_key3 | varchar(80) | YES | | NULL | |
| free_value3 | varchar(200) | YES | | NULL | |
| free_key4 | varchar(80) | YES | | NULL | |
| free_value4 | varchar(200) | YES | | NULL | |
| created | datetime | YES | | NULL | |
| created_by | int(11) | YES | | NULL | |
| changed | datetime | YES | | NULL | |
| changed_by | int(11) | YES | | NULL | |
| f_number | varchar(200) | NO | | NULL | |
+---------------+--------------+------+-----+---------+----------------+
26 rows in set (0.00 sec)


'table in newly created db' :

mysql> desc faq_item;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| f_number | varchar(200) | NO | | NULL | |
| f_subject | varchar(200) | YES | | NULL | |
| f_name | varchar(200) | NO | | NULL | |
| f_language_id | smallint(6) | NO | | NULL | |
| state_id | smallint(6) | NO | | NULL | |
| category_id | smallint(6) | NO | | NULL | |
| approved | smallint(6) | NO | | 1 | |
| f_keywords | text | YES | | NULL | |
| f_field1 | text | YES | | NULL | |
| f_field2 | text | YES | | NULL | |
| f_field3 | text | YES | | NULL | |
| f_field4 | text | YES | | NULL | |
| f_field5 | text | YES | | NULL | |
| f_field6 | text | YES | | NULL | |
| free_key1 | varchar(80) | YES | | NULL | |
| free_value1 | varchar(200) | YES | | NULL | |
| free_key2 | varchar(80) | YES | | NULL | |
| free_value2 | varchar(200) | YES | | NULL | |
| free_key3 | varchar(80) | YES | | NULL | |
| free_value3 | varchar(200) | YES | | NULL | |
| free_key4 | varchar(80) | YES | | NULL | |
| free_value4 | varchar(200) | YES | | NULL | |
| created | datetime | NO | | NULL | |
| created_by | int(11) | NO | | NULL | |
| changed | datetime | NO | | NULL | |
| changed_by | int(11) | NO | | NULL | |
+---------------+--------------+------+-----+---------+----------------+
27 rows in set (0.00 sec)



Is there some script I forgot to run perhaps ?
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Post by Wolfgangf »

you can try to add the missing field "approved" to your table

Code: Select all

alter table ..
or if your database is still empty: mysqldump from new 2.4.8 only table faq_item, drop table in updated db and import from mysqldump
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
maddog2k
Znuny newbie
Posts: 4
Joined: 22 Oct 2010, 20:10
Znuny Version: 2.4.8

Re: Upgrade of FAQ items from OTRS 1.3.2 to 2.4.8 went wrong

Post by maddog2k »

Hi Wolfgang,

ALTER TABLE to add the approved column seems to have done the trick, thanks ! :)

I still wonder if I missed something while performing my upgrade steps.
Locked