-
AuthorPosts
-
tranaee Friend
tranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 8, 2010 at 9:39 pm #156207I’ve got an error displaying in the search results only when I select certain fields for search. Most of the times is running ok..
No valid database connection 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 i.published = 1 GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 20’ at line 15 SQL=SELECT i.title AS title, i.metadesc, i.metakey, c.name as section, i.image_caption, i.image_credits, i.video_caption, i.video_credits, i.extra_fields_search, i.created, CONCAT(i.introtext, i.fulltext) AS text, CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(‘:’, i.id, i.alias) ELSE i.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(‘:’, c.id, c.alias) ELSE c.id END as catslug FROM jos_k2_items AS i INNER JOIN jos_k2_categories AS c ON c.id=i.catid AND c.access <= 2 WHERE i.id IN () AND i.published = 1 GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 20
… any clue?
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 8, 2010 at 9:55 pm #361997I found a way to get through with it..
I wrote again by typing directly the names in the text-fields (previously I had them pasted) and the search is running ok when checking existing compinations.
The bad thing is that when I’m checking a non-existing compination I get the previous error message rather than a no-results found indication..
.. any answer please?Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
November 9, 2010 at 3:07 am #362023Hi tranaee,
Please PM me your site login and Cpanel login. The developer wish to see the mysql DB for confirmation of issue. If you use skype / Gtalk please pass on the info, we can get in touch and try to solve the issue.
Arvind
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 9, 2010 at 11:01 am #362088Thanx for contacting =)
I’d like to post here again that the plugin-module is working OK and ONLY when I’m checking a non-existing compination I get the following error message rather than a no-results found indication:
“No valid database connection 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 i.published = 1 GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50’ at line 15 SQL=SELECT i.title AS title, i.metadesc, i.metakey, c.name as section, i.image_caption, i.image_credits, i.video_caption, i.video_credits, i.extra_fields_search, i.created, CONCAT(i.introtext, i.fulltext) AS text, CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(‘:’, i.id, i.alias) ELSE i.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(‘:’, c.id, c.alias) ELSE c.id END as catslug FROM jos_k2_items AS i INNER JOIN jos_k2_categories AS c ON c.id=i.catid AND c.access <= 0 WHERE i.id IN () AND i.published = 1 GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50”I must mark that not all of the k2 items have active extra-fields yet except from two categories that I’ve added them as a testing procedure.
Does the c-panel login is the only way for the developer to check the problem? I’m kind of afraid letting him/her get in there cause there are a lot of clients sites in subfolders running as addon-sites..I think that you’ll also need the php-myadmin login info as well..
Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
November 9, 2010 at 11:11 am #362089<blockquote>Does the c-panel login is the only way for the developer to check the problem? I’m kind of afraid letting him/her get in there cause there are a lot of clients sites in subfolders running as addon-sites..</blockquote>
He he, you can trust us on that. and we dont touch anything and dont change anything on client sites without taking backups. Its support policy.
While waiting for your reply, she has tried a probable fix in the svn, So give it a try :
Open ../plugins/plg_search_jak2_filter/jak2_filter.php and search for this code around line 356 :
[PHP]JArrayHelper::toInteger($ja_filter_items);
return ” i.id IN (“.implode(‘,’,$ja_filter_items).”)”;[/PHP]Change to :
[PHP]
JArrayHelper::toInteger($ja_filter_items);
if (count($ja_filter_items)==0)$ja_filter_items=array(0);
return ” i.id IN (“.implode(‘,’,$ja_filter_items).”)”;[/PHP]let us know if it helps.
Arvind
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 9, 2010 at 11:24 am #362092<em>@drarvindc 202587 wrote:</em><blockquote>
Open ../plugins/plg_search_jak2_filter/jak2_filter.php and search for this code around line 356 :
</blockquote>
There is nothing as ../plugins/plg_search_jak2_filter/jak2_filter.php in server. probably in some other path?
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 9, 2010 at 11:31 am #362093<em>@tranaee 202591 wrote:</em><blockquote>There is nothing as ../plugins/plg_search_jak2_filter/jak2_filter.php in server. probably in some other path?</blockquote>
Ok I found it. It’s in ../plugins/search/jak2_filter.php
I proceed with code replacement and let you know =)
tranaee Friendtranaee
- Join date:
- April 2009
- Posts:
- 51
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
- Thanked:
- 4 times in 1 posts
November 9, 2010 at 11:35 am #362094Super Cool!!!
No more error code on top when I’m getting 0 results =)
Only I get an “error” in the end under “Total: 0 results found.” result.Not that of a big drawback, but it would be better if the word error was missing.. It’s an h2 and is quite ugly.. haha
Thanx anyways
1 user says Thank You to tranaee for this useful post
Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
November 9, 2010 at 11:42 am #362096Good its working. Will ask the developer to do something out the error word << We will update this as new version tomorrow.
Arvind
-
AuthorPosts
This topic contains 9 replies, has 2 voices, and was last updated by Arvind Chauhan 14 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum