Osclass forums
Support forums => General help => 3.7.x => Topic started by: frosticek on June 06, 2017, 11:10:37 am
-
Hello guys,
Has something changed on 3.7.3 regarding location parameters on search?
Does not work on 3.7.3
http://url.com/search/country,DZ
Does work on 3.6
-
quick test: works fine on my end
-
Works fine on my setup too. I don't remember modifying anything related to the search either (but it could happen)
-
Works ok in my multi-country site.
Is something special i should look for ?
-
@Aficionado @_CONEJO
test this URLs
https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&country=DZ®ion=782629
https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&sCountry=Algeria&sRegion=Alger
they are search request same region
for the first it doesn't return results and for the second it does
I only replaced
country=DZ by sCountry=Algeria
region=782629 by sRegion=Alger
in the url
and by the way I've reinstalled Osclass as fresh but the same problem still exist
if you can show me how to modify search.php or other files so I can pass location strings rather than codes
-
I'm trying this on my 28 counties site:
https://www.website.com/search/sOrder,dt_pub_date/iOrderType,desc/country,FR/region,781333/city,Aignoz
and works great. Shows everything available.
Following your example it shoudln't work ? Am i getting this right ?
-
Could you check your rewrite rules ?
-
@Aficionado @_CONEJO
test this URLs
https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&country=DZ®ion=782629
https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&sCountry=Algeria&sRegion=Alger
they are search request same region
for the first it doesn't return results and for the second it does
I only replaced
country=DZ by sCountry=Algeria
region=782629 by sRegion=Alger
in the url
and by the way I've reinstalled Osclass as fresh but the same problem still exist
if you can show me how to modify search.php or other files so I can pass location strings rather than codes
What is that
"cookie-action-side,done"
in your urls ? If you have done custom work, then we can't follow your problem.
-
forget about rewrite rules,
could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?
could you debug your SQL to see the real query of the search?
-
What is that
"cookie-action-side,done"
in your urls ? If you have done custom work, then we can't follow your problem.
@Aficionado
"cookie-action-side,done" it a plugin related to zara theme i think it is used to remeber parameters like language ..etc
I've changed the theme to POP latest version
now retry with the URLs
https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&country=DZ®ion=782629
https://rawajnet.com/index.php?page=search&sOrder=dt_pub_date&iOrderType=desc&sCountry=Algeria&sRegion=Alger
the problem still exist
-
Could you check your rewrite rules ?
These are my rewrite rules
@_CONEJO
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
which are the ones in permalink configuration
-
I'm trying this on my 28 counties site:
https://www.website.com/search/sOrder,dt_pub_date/iOrderType,desc/country,FR/region,781333/city,Aignoz
and works great. Shows everything available.
Following your example it shoudln't work ? Am i getting this right ?
the link that you've provided return 404 error
my links returns different results for same search go on and check by yourself
the first generated by search button in the website the second I've modified the first generated url
-
could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?
could you debug your SQL to see the real query of the search?
-
forget about rewrite rules,
could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?
could you debug your SQL to see the real query of the search?
apparently all values are Null in fk_c_country_code
and this is a screenshot of the table
-
I'm trying this on my 28 counties site:
https://www.website.com/search/sOrder,dt_pub_date/iOrderType,desc/country,FR/region,781333/city,Aignoz
and works great. Shows everything available.
Following your example it shoudln't work ? Am i getting this right ?
the link that you've provided return 404 error
my links returns different results for same search go on and check by yourself
the first generated by search button in the website the second I've modified the first generated url
Of cource it returns 404, website.com is not a real url.....
-
I'm trying this on my 28 counties site:
https://www.website.com/search/sOrder,dt_pub_date/iOrderType,desc/country,FR/region,781333/city,Aignoz
and works great. Shows everything available.
Following your example it shoudln't work ? Am i getting this right ?
the link that you've provided return 404 error
my links returns different results for same search go on and check by yourself
the first generated by search button in the website the second I've modified the first generated url
Of cource it returns 404, website.com is not a real url.....
:o :o :o :o :o :o :o :o :o :o :o
so why you gave it as example
-
:o :o :o :o :o :o :o :o :o :o :o
so why you gave it as example
Dude, that was a real search from MY SITE that i removed the domain name, because i don't like to post publicly an urls of mine.
Is that clear now ?
-
forget about rewrite rules,
could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?
could you debug your SQL to see the real query of the search?
apparently all values are Null in fk_c_country_code
and this is a screenshot of the table
So that's your problem, you are looking by country code (DZ) doesn't work because the fk_c_country_code column is null ...
-
forget about rewrite rules,
could you check your t_item_location table? is there anything on fk_c_country_code ? are you sure it was working before?
could you debug your SQL to see the real query of the search?
apparently all values are Null in fk_c_country_code
and this is a screenshot of the table
So that's your problem, you are looking by country code (DZ) doesn't work because the fk_c_country_code column is null ...
How can I fix this
-
Maybe it's related to some zara code, wher eyou using POP theme before or after this issue?
To fix it, just run on your database:
UPDATE oc_t_item_location SET fk_c_country_code = "DZ" WHERE s_country = "Algeria";
But if there's a bug somewhere, in a plugin or the theme or in the core, this will happen again.
-
Maybe it's related to some zara code, wher eyou using POP theme before or after this issue?
To fix it, just run on your database:
UPDATE oc_t_item_location SET fk_c_country_code = "DZ" WHERE s_country = "Algeria";
But if there's a bug somewhere, in a plugin or the theme or in the core, this will happen again.
Thank you very much for your help
but it seems the problem is also with region and cities I'll try to find a way to do the same with them
an SQL query which seems to be complicated
-
this is query for region
UPDATE oc_t_item_location, oc_t_region
SET oc_t_item_location.fk_i_region_id = oc_t_region.pk_i_id
WHERE oc_t_item_location.s_region = oc_t_region.s_name
this the query for city
UPDATE oc_t_item_location, oc_t_city
SET oc_t_item_location.fk_i_city_id = oc_t_city.pk_i_id
WHERE oc_t_item_location.s_city = oc_t_city.s_name
-
@crymatisticos
Can you check if this happen for new listings as well? Otherwise your code will fix just historical issues.
-
@crymatisticos
Can you check if this happen for new listings as well? Otherwise your code will fix just historical issues.
sorry for replying late
it's still happening and make the queries daily to fix the issue
-
@crymatisticos
Do we have this situation now?
- country in it's table has defined country code
- country code is not stored in item table (item_location) ?