*

Smithtech

  • ****
  • 219 posts
SEARCH PAGE ISSUE
« on: January 04, 2023, 10:27:08 PM »
Dear Team,

Please, has anyone tried this theme with about 2000 listings?
exemple.com/search doesn't show listings. only shows eg: 1800 results found with a blank page.
When it comes to categories, categories with over 500 listings also do not show any listings.

Pagination isn't showing at all on categories pages even after you disable infinite scroll plugin.

Everything works fine with Delta theme.

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #1 on: January 04, 2023, 10:41:28 PM »
Just to add.
Since pagination is not showing for categories that have fewer listings like 200. Only the first page that shows. The rest of the listings do not show.

*

MB Themes

Re: SEARCH PAGE ISSUE
« Reply #2 on: January 05, 2023, 01:20:27 PM »
Do you use latest version of osclass?
I saw site with 2.5m of listings recently running on Osclass 8.0.2
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #3 on: January 05, 2023, 02:40:43 PM »
Do you use latest version of osclass?
I saw site with 2.5m of listings recently running on Osclass 8.0.2

Yes. Using Osclass 8.0.2.
The issue occurs with Epsilon Theme.
Delta Theme is working fine.

Some filter options showing this error: There was problem loading your listings, please try to refresh this page

*

MB Themes

Re: SEARCH PAGE ISSUE
« Reply #4 on: January 05, 2023, 02:49:44 PM »
Try to reinstall theme (activate/deactivate) and check if oc_t_item_epsilon table exists in database (from mode/struct.sql).
Also check this: https://forums.osclasspoint.com/epsilon-osclass-theme/categories-not-working-when-using-epsilon/
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #5 on: January 05, 2023, 04:27:10 PM »
Reinstalled Theme Still same issue.
Table t_item_epsilon exists in model/struct.sql without the table prefix (oc).

Tried Gama also and got the same errors.


*

MB Themes

Re: SEARCH PAGE ISSUE
« Reply #6 on: January 05, 2023, 05:02:54 PM »
@Smithtech
Ok, then enable DB_DEBUG_LOG and review SQL errors at bottom of search page.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #7 on: January 05, 2023, 06:02:02 PM »
Ok. Enabled debug but got no error.

Realized that the issue is with a parent category and one of its child categories. Down to a listing. Yet to find out why the listing is causing the problem.
Maybe because of republish? Still checking.

Because when you block that particular listing, the search page works fine. But when you unblock it, problem
« Last Edit: January 05, 2023, 06:03:58 PM by Smithtech »

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #8 on: January 05, 2023, 06:10:06 PM »
When you Unmark the listing as premium search page works. When you mark it as premium, search page returns nothing

*

MB Themes

Re: SEARCH PAGE ISSUE
« Reply #9 on: January 05, 2023, 09:04:04 PM »
You must see that in relevant query that perform search... So find it, out it there and we will be 1 step ahead  :)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #10 on: January 06, 2023, 12:43:03 PM »
Below are the queries involving that particular listing with ID = 3610

Code: [Select]
SELECT *
FROM (oc_t_item_description)
WHERE oc_t_item_description.fk_i_item_id = '3610'


Code: [Select]
SELECT oc_t_item_location.*, cd.s_name as s_category_name, SUM(`s`.`i_num_views`) as `i_num_views`, SUM(`s`.`i_num_spam`) as `i_num_spam`, SUM(`s`.`i_num_bad_classified`) as `i_num_bad_classified`, SUM(`s`.`i_num_repeated`) as `i_num_repeated`, SUM(`s`.`i_num_offensive`) as `i_num_offensive`, SUM(`s`.`i_num_expired`) as `i_num_expired`, SUM(`s`.`i_num_premium_views`) as `i_num_premium_views`
FROM (oc_t_item_location, oc_t_category_description as cd, oc_t_item_stats as s)
WHERE oc_t_item_location.fk_i_item_id = '3610'
AND s.fk_i_item_id = '3610'
AND cd.fk_i_category_id = '118'
AND cd.fk_c_locale_code = 'en_US'
GROUP BY oc_t_item_location.fk_i_item_id


Code: [Select]
INSERT INTO oc_t_item_stats (fk_i_item_id, dt_date, i_num_premium_views) VALUES (3610, '2023-01-05 16:41:13',1) ON DUPLICATE KEY UPDATE i_num_premium_views = i_num_premium_views + 1
Code: [Select]
SELECT *
FROM (oc_t_item_description)
WHERE oc_t_item_description.fk_i_item_id = '3610'
   And the whole search page queries end here with this problematic item's querry.

*

MB Themes

Re: SEARCH PAGE ISSUE
« Reply #11 on: January 09, 2023, 03:40:41 PM »
All looks good, aim for this one (run on DB) if you have data and it's ok:
Code: [Select]
SELECT oc_t_item_location.*, cd.s_name as s_category_name, SUM(`s`.`i_num_views`) as `i_num_views`, SUM(`s`.`i_num_spam`) as `i_num_spam`, SUM(`s`.`i_num_bad_classified`) as `i_num_bad_classified`, SUM(`s`.`i_num_repeated`) as `i_num_repeated`, SUM(`s`.`i_num_offensive`) as `i_num_offensive`, SUM(`s`.`i_num_expired`) as `i_num_expired`, SUM(`s`.`i_num_premium_views`) as `i_num_premium_views`
FROM (oc_t_item_location, oc_t_category_description as cd, oc_t_item_stats as s)
WHERE oc_t_item_location.fk_i_item_id = '3610'
AND s.fk_i_item_id = '3610'
AND cd.fk_i_category_id = '118'
AND cd.fk_c_locale_code = 'en_US'
GROUP BY oc_t_item_location.fk_i_item_id
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #12 on: June 16, 2023, 02:28:36 AM »
Hi Team,

The issue is back again.


This issue is mainly with Epsilon. Delta and Gama search work fine.

The issue occurs in one particular category when an item is premium. Cannot specifically tell how.


That is not the only search issue. The filter of most children categories gives error.


Below is the PHP debug output of the blank search page.

Code: [Select]
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/user/public_html/oc-includes/osclass/helpers/hUtils.php:64 Stack trace:
#0 /home/user/public_html/oc-includes/osclass/helpers/hItems.php(99): osc_field('', 's_title', 'en_US')
 #1 /home/user/public_html/oc-includes/osclass/helpers/hItems.php(194): osc_item_field('s_title', 'en_US')
#2 /home/user/public_html/oc-content/plugins/spam/functions.php(361): osc_item_title()
#3 /home/user/public_html/oc-includes/osclass/classes/Plugins.php(69): ans_clear_title('')
#4 /home/user/public_html/oc-includes/osclass/helpers/hPlugins.php(46): Plugins::applyFilter('item_title', '')
#5 /home/user/public_html/oc-includes/osclass/model/Item.php(1306): osc_apply_filter('item_title', '')
#6 /home/user/public_html/oc-includes/osclass/model/Search.php(1199): Item->extendData(Array)
#7 /home/user/public_html/oc-includes/osclass/helpers/hPremium.php(48): Search->getPremiums(20)
#8 /home/user/public_html/oc-content/themes/epsilon/search.php(355): osc_get_premiums(20)
#9 /home/user/public_html/oc-includes/osclass/helpers/hDefines.php(460): require('/home/user...')
#10 /home/user/public_html/oc-includes/osclass/controller/search.php(746): osc_current_web_theme_path('search.php')
#11 /home/user/public_html/oc-includes/osclass/controller/search.php(678): CWebSearch->doView('search.php')
#12 /home/user/public_html/index.php(272): CWebSearch->doModel()
#13 {main} thrown in /home/user/public_html/oc-includes/osclass/helpers/hUtils.php on line 64


Delta works fine


DB debug returned Ok

*

MB Themes

Re: SEARCH PAGE ISSUE
« Reply #13 on: June 16, 2023, 09:02:56 AM »
Go to that file and try to put this on line 57:
Code: [Select]
if($item !== null && is_array($item) && !empty($item)) {
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: SEARCH PAGE ISSUE
« Reply #14 on: June 16, 2023, 04:17:17 PM »
Thank you for the response.

Please, which file are you referring to?
Because I tried on
Code: [Select]
search.php and got Unexpected End Of File error and the Search page could not load at all: HTTP ERROR 500