Sorting questions
This topic contains 23 replies, has 4 voices, and was last updated by  jotomas 6 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket- 
		AuthorPosts
 - 
		
			
				
October 2, 2019 at 4:56 pm #511267
Login credentials are no longer valid. Please update them so we can look into that issue. I cannot think of a sort that would/should show duplicates, so, there is something funny going on and we will find a solution for it.
WordPress Credentials
WP Admin Login URL:
WP Admin Username:
WP Admin Password:FTP Credentials
FTP Host:
FTP Port:
FTP User:
FTP Password:October 2, 2019 at 8:24 pm #511314This reply has been marked as private.October 3, 2019 at 10:37 pm #511510This reply has been marked as private.October 4, 2019 at 6:29 am #511546Hi Jotomas,
I checked and found some strange behaviour in SQL query results. I tried to execute query directly in phpMyAdmin and on every refresh it changes the listings order among same package id. I checked on my test site but this not happening there.
I have tested following query.
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, wp_geodir_gd_ruta_tapes_detail.package_id FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_geodir_gd_ruta_tapes_detail ON (wp_geodir_gd_ruta_tapes_detail.post_id = wp_posts.ID) JOIN wp_icl_translations wpml_translations ON wp_posts.ID = wpml_translations.element_id AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (688) ) AND wp_posts.post_type = 'gd_ruta_tapes' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private' OR wp_posts.post_status = 'gd-expired') AND wp_posts.post_type = 'gd_ruta_tapes' GROUP BY wp_posts.ID ORDER BY wp_geodir_gd_ruta_tapes_detail.package_id desc LIMIT 0, 18On /a-taula/ page first 3 listings has package id 35 and rest have 21. So on every refresh it changes order of listings within package_ids.
To fix this i have applied second lever sorting on your site via PHP snippet under Snippet > Listing Sorting.
Now it shows correct listings.
Please check and let us know.
Best Regards,
KiranOctober 4, 2019 at 9:59 am #511586Hi Kiran,
Thank you very much for your reply.
In fact, I did notice this behaviour “on every refresh it changes the listings order among same package id”, but as it has always been this way, I assumed from the beginning that it was the normal behaviour.
I will check and I will let you know if I notice something strange.
By the way, I noticed that you have put the snippet in the network admin dashboard. Is this correct or should it be put in the site admin dashboard?
I look forward to your news.
Thank you very much once again for your help.
Best regards.
October 4, 2019 at 10:08 am #511588I noticed that you have put the snippet in the network admin dashboard. Is this correct or should it be put in the site admin dashboard?
I have added it to network dashboard to fix sorting on network wide. Both are correct either you can add it to site wide or network wide.
Kiran
October 4, 2019 at 12:09 pm #511599Hi Kiran,
Ok, thank you very much.
Do you think that the strange behaviour with sorting could be only specific to my site or could happen also with other sites? I mean, is this something that you will look at or should I keep the snippet forever?
I look forward to your news.
Thank you very much once again for your help.
Best regards.
October 4, 2019 at 12:59 pm #511603I checked on my test site and i can’t replicate there, so it could be server specific. You keep that snippet on site where you see similar issue.
Kiran
October 4, 2019 at 2:08 pm #511617Hi Kiran,
Ok, thanks a lot!
Best regards.
 - 
		AuthorPosts
 
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket