When a user is logged in and goes to My Account -> Alerts , he/she is supposed to see the items that are in the same categories of the alerts he subscribed to previously, the bug is that if one of these items to be displayed is created from the admin panel as opposed to another using creating it, and hence in the database this item has no associated user 'oc_t_item.fk_i_user_id = NULL' this 1 item gets displayed 12 times and no other items get displayed.
To recreate this you can
1-go the demo osclass website
2-login to the demo account
3-just press the search button
4-after you get the search results subscribe to this search
5-go to My Account->Alerts
you should see something like what's linked in the attachment.
Another question the limit in this page is only 12 items and it's not paginated so you only get the most recent 12 items. is this on purpose?
When I logged the queries I believe the query that does this is
FROM ( oc_t_user , oc_t_item)
LEFT OUTER JOIN oc_t_item_delta ON oc_t_item.pk_i_id = oc_t_item_delta.fk_i_item_id
WHERE ((oc_t_user.pk_i_id = oc_t_item.fk_i_user_id AND oc_t_item.fk_i_user_id != 9) || oc_t_item.fk_i_user_id IS NULL)
AND oc_t_item.b_enabled = 1 AND oc_t_item.b_active = 1 AND oc_t_item.b_spam = 0 AND (oc_t_item.b_premium = 1 || oc_t_item.dt_expiration >= '2022-03-03 14:44:03')
AND oc_t_item.fk_i_category_id IN (99)
ORDER BY dt_pub_date desc
LIMIT 0, 12
this from my setup so changes apply but this is the query that gets this list and I believe it's constructed using the DAO in oc-includes/osclass/model/Search.php
Any help appreciated.