Forums / Cotonti / Bugs / [fixed] Search error

error when you select custom range

Harker
#1 2015-11-20 11:47

Hi,

I have donwloaded Cotonti from Github for test with a Fresh install

There is an error in the plugin Search. When you selected the option 'Custom range'

 

2015-11-20 11:46

SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND page_date <= AND (page_title LIKE '%1234%' OR page_desc LIKE '%1234%' OR pa' at line 3

#0  cot_diefatal(SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND page_date <=  AND (page_title LIKE '%1234%' OR page_desc LIKE '%1234%' OR pa' at line 3) called at [C:\EasyPHP\data\localweb\fresh\system\database.php:574]
#1  CotDB->query(SELECT SQL_CALC_FOUND_ROWS p.* 
                FROM cot_pages AS p 
                WHERE page_cat IN ('articles','events','news') AND page_state = 0 AND page_cat <> 'system' AND page_begin <= 1448019962 AND (page_expire = 0 OR page_expire > 1448019962) AND page_date >=  AND page_date <=  AND (page_title LIKE '%1234%' OR page_desc LIKE '%1234%' OR page_text LIKE '%1234%')
                ORDER BY page_date ASC
                LIMIT 0, 50) called at [C:\EasyPHP\data\localweb\fresh\plugins\search\search.php:290]
#2  include(C:\EasyPHP\data\localweb\fresh\plugins\search\search.php) called at [C:\EasyPHP\data\localweb\fresh\system\plugin.php:94]
#3  require_once(C:\EasyPHP\data\localweb\fresh\system\plugin.php) called at [C:\EasyPHP\data\localweb\fresh\index.php:172]

 


Dit bericht is bewerkt door Macik (2015-12-02 13:01, 8 jaren ago)
Macik
#2 2015-11-21 17:58

Thanks for report.
I had open a ticket #1450

Добавлено 1 неделя спустя:

Fixed with c563c6. Please test it.

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F

Dit bericht is bewerkt door Macik (2015-11-30 23:56, 8 jaren ago)
Harker
#3 2015-12-02 08:39

This works great, thank you ;)