404 error for country links
This topic contains 19 replies, has 3 voices, and was last updated by clem 8 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 22, 2017 at 9:28 pm #347593
Hi !
In my website, I have created 1 page per continent and in each page I have 1 link per country
My link is like that : http://mywebsite.com/places/egypt/
but If I haven’t created a place in the country, I have a 404 error when I click on it.
So I’m going to create 1 “fake” place per country, lot of work …
Before starting that I just want to be sure there isn’t another way to make all my country links working
I have noticed that when I have created a place even if I delete it right away, the link is still working (I have the message “no places found” as expected)
Thanks
Clément
January 22, 2017 at 10:38 pm #347616Country links will not work until you have at least one location in that country.
Then the URL will be yoursite.com/slug-of-your-location-page/country-slugPlease review these links:
https://wpgeodirectory.com/docs/layout/#directory
https://wpgeodirectory.com/docs/manage-location/#edit
https://wpgeodirectory.com/docs/location-manager-shortcodes/#switch
http://wordpressmu-3822-8567-17899.cloudwaysapps.com/try-geodirectory/all-locations/Let us know how you went.
January 22, 2017 at 11:37 pm #347629Ok Thanks, I read and understood better how it works !
In fact I don’t need to create 1 place per country and then delete it, I just need to go to the multi location menu and adding 1 new location per country ! so much faster 🙂
January 23, 2017 at 12:45 am #347696You’re welcome 🙂
February 2, 2017 at 1:41 am #353639Hi Guust !
I have finished to add all the locations, so now I haven’t the problem with the 404 error page redirection anymore
However I still have a problem I can’t understand :
For some country it works perfectly, when I click on the link I have created (ex: monsite.com/place/spain), I’m redirected on a page where I see only the place of that country
But for some countries, even if I have some places added, I have the message : no records found
I also have noticed :
1- when It works, in the search bar, “near” is replaced by “in Spain (country)” and this field is green but when it doesn’t work, the “near” still appear but the field is also green
2- For some countries who work, sometimes it’s the whole world map with just the places of the country and sometimes the map is focus only on the country (I would like to have the map focus on the country for all countries …)
I did exactly the same for all countries :
1- I created a page for the 5 continents
2- In that pages, I created 1 link for each country (my site.com/places/spain)
3- Through the multiplications settings, I created 1 place for each country
So I don’t understand why it works for some countries and not for the others …
February 2, 2017 at 2:11 am #353647This reply has been marked as private.February 2, 2017 at 10:52 am #353818/places/thailand-1
/places/ukraine-1
/places/india-1See more at these links:
https://wpgeodirectory.com/docs/faqs/why-do-my-locations-get-a-1-at-the-end/
https://wpgeodirectory.com/docs/manage-location/#editIt might be simpler just to add the location switcher:
https://wpgeodirectory.com/docs/multilocations/#mainFebruary 3, 2017 at 12:25 am #354210Exactly, thanks for your help Guust
Indeed, all the countries where I have added places few weeks ago have slugs without -1 but all the country I have added the first place recently have slug with -1
I just have to add the -1 at those country links and it works 🙂
I still have a problem, when I am in a country listing result page and I switch language (I use WPML) I’m redirected to the 404 error page
Maybe only because yet I haven’t translated the countries in the multi location add-on, I will try it in the next couple of days …
February 7, 2017 at 1:04 am #356162Hi Guust
I have spent time to understand my 404 error page problem I explained on the post above :
First of all I have noticed I’m redirected to the 404 only when the slug of the country is “mysite.com/places/spain” and not when it’s a country with the slug ending with -1 (in that case I’m redirected to mysite.com/fr)
1/ mysite.com/places/spain :
I have the 404 problem only because when I’m in the country listing result (English) and I click on the French flag, the address in my browser search bar is : mysite.com/fr/placesspain/ and it should be : mysite.com/fr/places/spain/
Can I add the missing ” / ” by myself or is it a Geodirectory / WPML bug ?
2/ mysite.com/places/thailand-1 :
I have no idea why in that case I’m redirected to the French home page but I don’t really want to figure it out because I would like to get rid of the -1 from my country slugs because it’s too much confusing
Do you know how can I find the original slug “thailand” and delete it ?
When I have done it, How can I delete the -1 of the country slug ?3/ About the translation that’s my last issue, in the frontend except that problem, everything is working as it should be. But in the backend, in multi location I have tried to translate the countries as explained but in my Geodirectory core Po. file the countries are already translated so I don’t think I have to change it.
But when I click on “multilocation > Translate countries > update” nothing happen, the French names and slugs are still the same than EnglishAs everything works well in the frontend is not a big problem for me but for the SEO it would be so much better if I find out how to translate it …
Thanks again for your precious advices 🙂
February 7, 2017 at 12:00 pm #356292Your permalinks were not set correctly:
https://wpgeodirectory.com/docs/basic-installation/#postnames
FIXEDTo change the “-1” you need to visit the database:
https://wpgeodirectory.com/docs/faqs/why-do-my-locations-get-a-1-at-the-end/We’re fixing a bug that we found too, so we are fixing that. We will let you know when that is done.
Thanks for your patience.
February 7, 2017 at 1:57 pm #356346Hi Clem,
1) This have been fixed and will be reflected in next release of GD + GD Addons.
2) This should be fixed from database manually.
3) Translate countries translates the country slug based on translated country. We have some changes on this and it will be available in next release.
Please provide FTP & Database details so we can apply patch on your site and also fix 2).
Thanks,
KiranFebruary 7, 2017 at 11:27 pm #356633This reply has been marked as private.February 8, 2017 at 7:32 am #356850This reply has been marked as private.February 8, 2017 at 7:46 am #356854This reply has been marked as private.February 8, 2017 at 11:16 am #356906Hello Clem,
I have updated patch to your site.
Please check all the points and let us know if still have any problem.Thanks,
Kiran -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket