1

Topic: search items on Knowledge Base doesn't work.

Hi All,
I use GLPI 0.90.1 on Operating system: Linux debian 3.16.0.
We've recorded many Knoledge base items, but the search functions doesn't work, particulary doesn't return anything !

I've checked sql-errors.log and I've look at an error (this) :
  Error: Unknown column 'glpi_knowbaseitemtranslations.name' in 'where clause'

The complete Query is this :

2016-02-23 10:26:56 [[email protected]]
  *** MySQL query error:
  SQL: SELECT COUNT(`glpi_knowbaseitems`.`id`)
                             FROM `glpi_knowbaseitems`
                              LEFT JOIN `glpi_knowbaseitems_users`
                     ON (`glpi_knowbaseitems_users`.`knowbaseitems_id` = `glpi_knowbaseitems`.`id`)  LEFT JOIN `glpi_groups_knowbaseitems`
                        ON (`glpi_groups_knowbaseitems`.`knowbaseitems_id`
                              = `glpi_knowbaseitems`.`id`)  LEFT JOIN `glpi_knowbaseitems_profiles`
                        ON (`glpi_knowbaseitems_profiles`.`knowbaseitems_id`
                              = `glpi_knowbaseitems`.`id`)  LEFT JOIN `glpi_entities_knowbaseitems`
                        ON (`glpi_entities_knowbaseitems`.`knowbaseitems_id`
                              = `glpi_knowbaseitems`.`id`)
                             WHERE (`glpi_knowbaseitems_users`.`users_id` = \'7\'  OR `glpi_knowbaseitems_users`.`users_id` = \'7\'  OR (`glpi_groups_knowbaseitems`.`groups_id`
                                    IN (\'1\')
                               AND (`glpi_groups_knowbaseitems`.`entities_id` < 0
                                    OR (  1 ) ))  OR (`glpi_knowbaseitems_profiles`.`profiles_id`
                                    = \'4\'
                               AND (`glpi_knowbaseitems_profiles`.`entities_id` < 0
                                    OR (  1 ) )) OR ( `glpi_entities_knowbaseitems`.`entities_id` IN (\'0\')  ) )  AND MATCH(`glpi_knowbaseitems`.`name`,
                                             `glpi_knowbaseitems`.`answer` ,`glpi_knowbaseitemtranslations`.`name`,
                                 `glpi_knowbaseitemtranslations`.`answer`)
                          AGAINST(\'ateco\' IN BOOLEAN MODE)  AND (`glpi_knowbaseitems`.`begin_date` IS NULL
                                   OR `glpi_knowbaseitems`.`begin_date` < NOW())
                             AND (`glpi_knowbaseitems`.`end_date` IS NULL
                                  OR `glpi_knowbaseitems`.`end_date` > NOW())
  Error: Unknown column 'glpi_knowbaseitemtranslations.name' in 'where clause'
  Backtrace :
  inc/knowbaseitem.class.php:1120
  inc/knowbaseitem.class.php:1228                    KnowbaseItem::getListRequest()
  inc/knowbase.class.php:138                         KnowbaseItem::showList()
  inc/knowbase.class.php:87                          Knowbase::showSearchView()
  inc/commonglpi.class.php:469                       Knowbase::displayTabContentForItem()
  ajax/common.tabs.php:91                            CommonGLPI::displayStandardTab()

Could you help me to understand ?
As is the KB Managemente is unusable !

Thanks in advance
Pietro

2

Re: search items on Knowledge Base doesn't work.

This problem is solved in 0.90.2svn

CentOS 6.5 - PHP 5.6 - PHP 7 - MySQL 5.6  + APC + memcached
GLPI 0.90.5 SVN - GLPI 9.1.3 SVN
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

3

Re: search items on Knowledge Base doesn't work.

Thanks very much, yllen.
But is this a kind of patch ? Is the download available ?

Many thanks !
Pietro

4

Re: search items on Knowledge Base doesn't work.

0.90.2svn is here: https://github.com/glpi-project/glpi/co … 0/bugfixes

CentOS 6.5 - PHP 5.6 - PHP 7 - MySQL 5.6  + APC + memcached
GLPI 0.90.5 SVN - GLPI 9.1.3 SVN
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

5

Re: search items on Knowledge Base doesn't work.

Sorry Madame !
But I'm not able to find the bugfix indicated !
I've linked the link attached, but nothing ! (https://github.com/glpi-project/glpi/co … 0/bugfixes)

Could you exsplane me better how find it ?

Many many many thanks ! smile
Pietro

6

Re: search items on Knowledge Base doesn't work.

Hi Yllen,
any help about my previous post ?

Could you explain me better how find the right link ?

Thanks in advance !
Pietro

7

Re: search items on Knowledge Base doesn't work.

someone could help me to understand the solution indicated by Yllen?
I have trouble understanding!
Many thanks in advance
Pietro

8

Re: search items on Knowledge Base doesn't work.

Look at your database for glpi_knowbaseitemtranslations
Have you field name?

CentOS 6.5 - PHP 5.6 - PHP 7 - MySQL 5.6  + APC + memcached
GLPI 0.90.5 SVN - GLPI 9.1.3 SVN
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

9

Re: search items on Knowledge Base doesn't work.

-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 18, 2016 at 05:02 PM
-- Server version: 5.5.46-0+deb8u1
-- PHP Version: 5.6.14-0+deb8u1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `glpi`
--

-- --------------------------------------------------------

--
-- Table structure for table `glpi_knowbaseitemtranslations`
--

CREATE TABLE IF NOT EXISTS `glpi_knowbaseitemtranslations` (
`id` int(11) NOT NULL,
  `knowbaseitems_id` int(11) NOT NULL DEFAULT '0',
  `language` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
  `name` text COLLATE utf8_unicode_ci,
  `answer` longtext COLLATE utf8_unicode_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `glpi_knowbaseitemtranslations`
--
ALTER TABLE `glpi_knowbaseitemtranslations`
 ADD PRIMARY KEY (`id`), ADD KEY `item` (`knowbaseitems_id`,`language`), ADD FULLTEXT KEY `fulltext` (`name`,`answer`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `glpi_knowbaseitemtranslations`
--
ALTER TABLE `glpi_knowbaseitemtranslations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;

10

Re: search items on Knowledge Base doesn't work.

yllen,
Please, let me known if it's sufficient !

Thanks in advance
Pietro

11

Re: search items on Knowledge Base doesn't work.

You don't have to create this table.
If you don't have it you must had a problem during your migration and you perhaps have other fields missing

CentOS 6.5 - PHP 5.6 - PHP 7 - MySQL 5.6  + APC + memcached
GLPI 0.90.5 SVN - GLPI 9.1.3 SVN
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

12

Re: search items on Knowledge Base doesn't work.

I've got the field in question...

  `name` text COLLATE utf8_unicode_ci, 

If you check the structure for table `glpi_knowbaseitemtranslations`you can see...these  !

Where's the problem ?

13

Re: search items on Knowledge Base doesn't work.

Hi yllen,
coul you reply at my previous question ? Thanks very very much in advance. smile

Pietro.

14

Re: search items on Knowledge Base doesn't work.

Hi All,
I've installed a new instance, on GLPI 9.1.2 , unfortunately the knowledge-base search function does not work yet!

Could you help me ?
is there a fixing to apply? Thanks to everyone in advance.

Ciao
Pietro

15

Re: search items on Knowledge Base doesn't work.

Look in your database if you haven't crashed tables.
Do you have article of knowbase translated in another language?

CentOS 6.5 - PHP 5.6 - PHP 7 - MySQL 5.6  + APC + memcached
GLPI 0.90.5 SVN - GLPI 9.1.3 SVN
Certifiée ITIL (ITV2F, ITILF, ITILOSA)