92 Posts
Seb
2 years ago
1
Topic

Hi,

In the search result, when I click on page 2 and more, there is no result when there should be. The pagination has 5 pages of results :

Agenda - LPO PACA - Ligue pour la Protection des Oiseaux

Debug :

SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.parent_id AS parent,t0.author_id AS author,t0.author_session AS author_session,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 `#__content` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__cck_store_form_sorties_nature` AS t2 ON t2.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t1.access IN (1,1,2,3,4,5,6,7,8,9)
AND ( t1.publish_up = '0000-00-00 00:00:00' OR t1.publish_up <= '2022-09-19 06:21' )
AND ( t1.publish_down = '0000-00-00 00:00:00' OR t1.publish_down >= '2022-09-19 06:21' )
AND t0.storage_location = "joomla_article"
AND t1.state LIKE '%1%'
AND t1.catid LIKE '%24%'
AND t2.date_debut >= ''
AND t2.date_fin <= ''
AND t2.departement LIKE '%83%'
ORDER BY t2.date_debut ASC
LIMIT 12, 12

SELECT COUNT(t0.id)
FROM `#__cck_core` AS t0
LEFT JOIN `#__content` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__cck_store_form_sorties_nature` AS t2 ON t2.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t1.access IN (1,1,2,3,4,5,6,7,8,9)
AND ( t1.publish_up = '0000-00-00 00:00:00' OR t1.publish_up <= '2022-09-19 06:21' )
AND ( t1.publish_down = '0000-00-00 00:00:00' OR t1.publish_down >= '2022-09-19 06:21' )
AND t0.storage_location = "joomla_article"
AND t1.state LIKE '%1%'
AND t1.catid LIKE '%24%'
AND t2.date_debut >= ''
AND t2.date_fin <= ''
AND t2.departement LIKE '%83%'

Thanks for your help !

Get a VIP membership
92 Posts
Seb
2 years ago
0
Level 1

The problem comes from the date field :

AND t2.date_debut >= ''
AND t2.date_fin <= ''

This type of field is not ignored with the empty search, in the following pages of the search result.

Get a Book for SEBLOD