Page 1 of 1

The PD-search PlugIn doesn´t work

Posted: 25 May 2011, 13:24
by seagoal2345
hi,
with J! 1.6.3 and PD 2.0.0 RC2 and plg_search_phocadownload_v2.0.1.zip.

Its installed without error and on the J!-search, the "Phoca Download" is listed.

I uploaded two pdf-files, they are active and public (btw. you can´t set therefore the language in the backend).

I searched for strings in title or description,
but there are no hits out of PD-stuff - only from other J!-content.
From PD there should be one result!

You have an idea, what reason is???

I ve a clip of the SELECT:
--------------

Code: Select all

SELECT 
CASE WHEN CHAR_LENGTH(a.title) THEN CONCAT_WS(': ', c.title, a.title) ELSE c.title END AS title, 
CASE WHEN CHAR_LENGTH(a.description) THEN CONCAT_WS(': ', a.title, a.description) ELSE a.title END AS text, a.id, a.date AS created, c.accessuserid as accessuserid, c.access as cataccess, 
CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, 
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END AS catslug, CONCAT_WS( " / ", 'Phoca Download', a.title ) AS section, "2" AS browsernav, c.id as catid, c.alias as catalias 
FROM #__phocadownload AS a INNER JOIN #__phocadownload_categories AS c ON c.id = a.catid 
WHERE ((a.title LIKE '%slanderbee%' OR a.alias LIKE '%slanderbee%' OR a.filename LIKE '%slanderbee%' OR a.metakey LIKE '%slanderbee%' OR a.metadesc LIKE '%slanderbee%' OR a.description LIKE '%slanderbee%') AND ( (unaccessible_file = 1 ) OR (unaccessible_file = 0 AND a.access IN (1,1) ) ) AND ( (unaccessible_file = 1 ) OR (unaccessible_file = 0 AND c.access IN (1,1) ) ) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2011-05-25 10:34:53' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2011-05-25 10:34:53' )) AND a.published = 1 AND a.approved = 1 AND c.published = 1 AND c.access IN (1,1) AND a.language in ('de-DE','*') AND c.language in ('de-DE','*') 
ORDER BY a.date DESC
---------------

Code: Select all

foreach($listFiles as $key => $value) {		echo "kkk ";    // line 263
gives no "kkk" in the frontend - so there are no values - but there should be one.
--------------

Code: Select all

$rows[] = $listFiles;	print_r($rows);  // line 278
gives
Array ( [0] => Array ( ) [1] => Array ( ) )
--------------

Code: Select all

if(count($rows)) {										// line 282
			foreach($rows as $row) {	echo "row ";
gives in the frontend
row row
or with
print_r($row);
Array ( ) Array ( )
--------------

thanks for help,
regards, s

Re: The PD-search PlugIn doesn´t work

Posted: 26 May 2011, 19:49
by seagoal2345
hi,
in the backend you still can´t serve the language for an upload ...
on line 240 // Filter by language in the phocadownload.php there is

Code: Select all

$db->Quote('*')
until there is no star, you have to change it to

Code: Select all

$db->Quote('')
cheers, s.

equal problem here:
viewtopic.php?f=1&t=14042
...

Re: The PD-search PlugIn doesn´t work

Posted: 27 May 2011, 16:31
by Jan
Hi, the star is OK, it means "all" languages. All files and categories where the language is not set are stored with "*" ... this is a standard Joomla! behaviour. Phoca only follows the Joomla! rules.

If you have some items created by some development versions with "" in your database, then this needs to be changed in the database to "*" :-(

Jan