ansonphong / postworld

Wordpress Theme Development Framework
GNU General Public License v2.0
7 stars 0 forks source link

live-feed feedQuery // Default 's' Parameter #70

Closed ansonphong closed 8 years ago

ansonphong commented 10 years ago

Hi Michel, I noticed when using the live-feed query, if the s / search parameter is left empty, then it returns no results. Although if I put the value as & then it returns the correct results.

So we want it to be if the s parameter is left empty, it's not included in the query. This would also go for other fields - if they're not defined, or left totally empty, then don't include them in the query.

This will allow the live-feed search panel to give a good infinite scroll browsing experience.

michelhabib commented 10 years ago

Phong, i feel this should be handled from php, just in case this function is used from outside javascript, it should still remove the empty/null parameters from the query. This also sounds like a strange behavior [although it could be handled this way in wordpress wp_query].

@hmikhail could you help? i think we need pw_query to drop any null/empty parameters, to avoid getting no results.

michelhabib commented 10 years ago

upon checking from Haidy's side, and my side now, it seems to me that this behavior is not reproducible [although i saw it before but wasn't sure it is an issue] i tried this url http://localhost/wordpress/search/#/live-feed-params/?s=&year=2008&monthnum=12 and it returns results, can you check our theme, and go to menu: live feed - url params and play with the params and let me know if it still behaves this way? i couldnt reproduce it with the above scenario, can you show me a scenario?

ansonphong commented 10 years ago

ok thanks I'll let you know about this...

On Sun, Nov 3, 2013 at 4:57 AM, michelhabib notifications@github.comwrote:

upon checking from Haidy's side, and my side now, it seems to me that this behavior is not reproducible [although i saw it before but wasn't sure it is an issue] i tried this url http://localhost/wordpress/search/#/live-feed-params/?s=&year=2008&monthnum=12 and it returns results, can you check our theme, and go to menu: live feed

  • url params and play with the params and let me know if it still behaves this way? i couldnt reproduce it with the above scenario, can you show me a scenario?

— Reply to this email directly or view it on GitHubhttps://github.com/phongmedia/postworld/issues/70#issuecomment-27644112 .