Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: pascal7 on 25 August 2014, 09:11:49

Title: Problems with apostrophizes
Post by: pascal7 on 25 August 2014, 09:11:49
Hello, I have a problem with the system of search. When I make a search with apostrophizes > ' <, the system of search does not function !


Pascal
Title: Re: Problems with apostrophizes
Post by: federica on 25 August 2014, 10:27:52
Ho pascal,
I fix this bug in the next relase. I you want fix the bug yourself, change this file.
your_site/components/com_abook/models/search.php
line 157
From
$query->where('LOWER( a.title ) LIKE "%'.$this->getState('filter.search').'%"');

to
$query->where('LOWER( a.title ) LIKE "%'.$db->escape($this->getState('filter.search')).'%"');
Title: Re: Problems with apostrophizes
Post by: pascal7 on 26 August 2014, 17:25:24
Ok, thank You, But i am using the joomla 2.5 version, sorry !

PLease ! Help me !

My website www.cheyne-editeur.com

Pascal
Title: Re: Problems with apostrophizes
Post by: federica on 26 August 2014, 17:47:53
your_site/components/com_abook/models/search.php
line 90
from:
$searchparamid['keyword']= "((a.title LIKE '%" .$this->getState('keyword') ."%') OR (a.subtitle LIKE '%" .$this->getState('keyword') ."%') OR (a.description LIKE '%" .$this->getState('keyword') ."%') OR (cat.title LIKE '%" .$this->getState('keyword') ."%') OR (a.catalogo LIKE '%" .$this->getState('keyword') ."%'))";

to:
$searchparamid['keyword']= "((a.title LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (a.subtitle LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (a.description LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (cat.title LIKE '%" .$db->escape($this->getState('keyword')) ."%') OR (a.catalogo LIKE '%" .$db->escape($this->getState('keyword')) ."%'))";
Title: Re: Problems with apostrophizes
Post by: pascal7 on 27 August 2014, 10:39:28
Thank You but it's not ok...

Fatal error: Call to a member function escape() on a non-object in /homepages/5/d342551515/htdocs/cheyne/components/com_abook/models/search.php on line 90

Pascal
Title: Re: Problems with apostrophizes
Post by: federica on 27 August 2014, 12:35:14
Can you tell me both joomla version and abook version?
I installed joomla 2.5.18 and abook 2.0.4 and the search with apostrophizes works fine without modify anything.
Title: Re: Problems with apostrophizes
Post by: pascal7 on 27 August 2014, 13:16:08
Joomla 2.5.9 and abook 2.0.4 ...

Title: Re: Problems with apostrophizes
Post by: federica on 28 August 2014, 21:00:20
What search string does not work? Can you give me an example?
Title: Re: Problems with apostrophizes
Post by: pascal7 on 08 September 2014, 09:25:26
Hi !

Here, When you search the book "L'ignare" >> No result

And when you search "Ignare"  >> The book with title "L'ignare" is found !

Pascal
Title: Re: Problems with apostrophizes
Post by: pascal7 on 22 September 2014, 17:15:42
How then I to make?
Title: Re: Problems with apostrophizes
Post by: imendes on 10 October 2014, 12:39:38
Just add this line:

       $db = JFactory::getDbo();

after line 86.

Like this:

function getKey()
        {
           $db = JFactory::getDbo();
      $searchparam = null;
...
Title: Re: Problems with apostrophizes
Post by: pascal7 on 10 October 2014, 14:47:56
It's not ok, Same Problem...

Hi !

Here,

www. cheyne-editeur.com/index.php/recherche-livre

When you search the book "L'ignare" >> No result

And when you search "Ignare"  >> The book with title "L'ignare" is found !

Pascal
Title: Re: Problems with apostrophizes
Post by: pascal7 on 23 October 2014, 11:53:10
No solutions ?

It's very very importante for me !

It's not ok, Same Problem...


Here,

www. cheyne-editeur.com/index.php/recherche-livre

When you search the book "L'ignare" >> No result

And when you search "Ignare"  >> The book with title "L'ignare" is found !

Pascal
Title: Re: Problems with apostrophizes
Post by: federica on 30 October 2014, 13:33:50
Hi pascal7,
I already fixed the problem in the version 3.0.0
Title: Re: Problems with apostrophizes
Post by: pascal7 on 21 November 2014, 10:20:32
Hi,

It's not possible ton find the probleme in the 2.5 version ?

I can't upgrade Joomla 2.5 on 3.0 Now..

Can you help me ?

Pascal
Title: Re: Problems with apostrophizes
Post by: federica on 21 November 2014, 12:49:38
Hi Pascal,
Abook for Joomla 2.5 is no longer developed.
I can not follow two versions at the same time, so I follow only the latest version.