16 Posts
plasadc
7 years ago
4
Topic

hi,

I've created a list and search type to search for a text string within the body text of an article.

The results are returned ok, but I always get a dialogue box at the top saying "message there is no result"

Any ideas on how to disable this?

See debug info below...

thanks

SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.parent_id AS parent,t0.author_id AS author,t0.cck AS cck,t0.storage_location AS loc,tt.id AS type_id,tt.alias AS type_alias
FROM `#__cck_core` AS t0
LEFT JOIN `#__cck_store_form_article` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__content` AS t2 ON t2.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t2.state = 1
AND t2.access IN (1,1,5)
AND ( t2.publish_up = '0000-00-00 00:00:00' OR t2.publish_up <= '2016-09-06 14:35' )
AND ( t2.publish_down = '0000-00-00 00:00:00' OR t2.publish_down >= '2016-09-06 14:35' )
AND t0.cck LIKE '%article%'
AND ((t1.article_text = 'avolites' OR t1.article_text LIKE 'avolites %' OR t1.article_text LIKE '% avolites %' OR t1.article_text LIKE '% avolites'))
ORDER BY t2.created DESC
LIMIT 30

SELECT COUNT(t0.id)
FROM `#__cck_core` AS t0
LEFT JOIN `#__cck_store_form_article` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__content` AS t2 ON t2.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t2.state = 1
AND t2.access IN (1,1,5)
AND ( t2.publish_up = '0000-00-00 00:00:00' OR t2.publish_up <= '2016-09-06 14:35' )
AND ( t2.publish_down = '0000-00-00 00:00:00' OR t2.publish_down >= '2016-09-06 14:35' )
AND t0.cck LIKE '%article%'
AND ((t1.article_text = 'avolites' OR t1.article_text LIKE 'avolites %' OR t1.article_text LIKE '% avolites %' OR t1.article_text LIKE '% avolites'))

3.445 seconds (3.445); 2.94 MB (2.938) - afterSearch [Cache=OFF] = 929 results.

Get a Book for SEBLOD
115 Posts
root
7 years ago
1
Level 1

Hi plasadc,

Maybe your module or menu item pointing this list has the option Search? (on 1st load) enabled. Try disabling it and the message will appear only when there is no result after you search.

Kind regards

16 Posts
plasadc
7 years ago
0
Level 2

Hi Root,

The message doesn't appear when I first go to the page, it's only after the search results are shown.

The error message is on a page which is a list and search type. Could that be an issue?

thanks

16 Posts
plasadc
7 years ago
1
Level 1

ok, so I have found what is causing the error....

I have 2 list & search types. One list shows some news articles, the other list contains some banners.

When I perform a search on the news articles, it breaks the banner list & search, causing a "there is no result" dialogue box.

So, does anyone know why the second list & search would stop working?

thanks

David

4229 Posts
Kadministrator
7 years ago
0
Level 2

Probably one of your searches depends on the some variable that is not present when you search in another search&list and since there is no result, it depends on e.g. what you use for search for banners

Get a Book for SEBLOD