404 not found
This topic contains 15 replies, has 2 voices, and was last updated by Stiofan O’Connor 10 years, 5 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
October 13, 2014 at 1:23 pm #18183
Hi,
Suddenly I get a 404 error on my directory main page.
I changed the standard ‘places’ post type name to ‘businesses’.
And in geodirectory>permalinks, set the following:
Listing url prefix: businesses
Location url prefix: locationIn geodirectory>custom post types I see the listing slug for the gd_place post type is changed automatically as well to ‘businesses’
Url for a listing/business is typically (working):
http://www.air-compressor-guide.com/businesses/canada/quebec/montreal/air-compressors/compresseurs-quebec/If you ‘go up the breadcrumbs’:
http://www.air-compressor-guide.com/businesses/canada/quebec/
http://www.air-compressor-guide.com/businesses/canada/
Are working fineBut the main page gives a 404 not found error:
http://www.air-compressor-guide.com/businesses/The ‘location’ main page is working fine:
http://www.air-compressor-guide.com/location/Tried everything, refresh, resave gd permalinks, re-save wordpress permalinks.
And, before it was working fine
Any ideas?
October 13, 2014 at 1:25 pm #18184You can’t have a prefix and a post type with the same name, it will not work.
Stiofan
October 13, 2014 at 1:32 pm #18185But if I change the prefix to ‘ABC’ on the permalinks screen, it changes automatically as well in the custom post type settings screen.. which makes kind of sense i think (I only use the standard gd_place post type)
Its the equivalent to
http://wpgeo.directory/attractions/
http://wpgeo.directory/hotels/Carsten
October 13, 2014 at 1:53 pm #18191I am not sure what you mean here, but you can’t have a prefix and a post type with the same slug, WP will not know what the page is referring to.
Stiofan
October 13, 2014 at 2:09 pm #18193Hi
I also don’t want that, I just want the 404 to be gone 🙂
Just for info I give you the screenshots:
See screenshot geo1: ‘listing url prefix’ is ‘businesses’
See screenshot geo2: ‘listing slug’ for gd_place is also set as ‘businesses’but /businesses/ is not working.
I can not name them differently. If I change one, the other one changes too automatically, and vice-versa.
If I change it to ‘abc’, they both change. And /abc/ is not working..
What are the standard settings for this, like on your demo, there it works perfectly for both /hotels/ and /attrachtions/ for example
Thanks
Carsten
October 13, 2014 at 2:11 pm #18195And to add to this…
These are all working:
/businesses/united-states/michigan/troy/
/businesses/united-states/michigan/
/businesses/united-states/And without a location, but just a category, it is working as well:
/businesses/air-compressors/ is working
BUT
/businesses/
Is not working.
It should show listings for all categories and all locations
Thanks
Carsten
October 13, 2014 at 2:14 pm #18196Please post ur wp-admin detail in a private reply and i will check your settings.
Stiofan
October 14, 2014 at 7:26 am #18282This reply has been marked as private.October 14, 2014 at 8:16 am #18284Some extra info…
I created a new post-type ‘gd_abc’ and create a test listing.
Same story…
working:
/abc/united-states/pennsylvania/philadelphia/test-abc/
/abc/united-states/pennsylvania/philadelphia/
/abc/united-states/pennsylvania/
/abc/united-states/Not working:
/abc/thanks
CarstenOctober 14, 2014 at 8:39 am #18286OK. Another test. I deactivated the custom post types plugin.. and re-activated it again.
Now the /businesses/ url started working again, but doesn’t show world-wide data, it shows the country which you last visited!
So if I visit /businesses/united-states/ first and after that /businesses/ , it shows united states businesses (also the breadcrumbs shows you’re on the usa sub-page).
If you visit /businesses/netherlands/ first, and go to /businesses/ afterwards, it shows all businesses from netherlands only
If I disable all cookies or open /businesses/ directly in a fresh browser I never use, I get the correct /businesses/ page, with the ‘this site is requesting your location’ popup.
But if I go to a country (in the fresh new browser) and back to the /businesses/ page, I get the same problem.
Since the deactivate/reactivation, it now seems to be a cookie problem.
please see screenshots
thanks,
CarstenOctober 14, 2014 at 8:46 am #18289forgot screenshot..
October 14, 2014 at 9:28 am #18292..sorry for me spamming this forum..
To add to the confusion… here’s what I just noticed on a new listing.
The breadcrumbs also seem to think I’m still on a page I visited before I visited this listing..
October 14, 2014 at 10:08 am #18301If you visit /businesses/netherlands/ first, and go to /businesses/ afterwards, it shows all businesses from netherlands only
This is the way it is supposed to work, if you enter the site in a category or location url that is specific, then your location is set as that so you can see all info from that location. The problem here and the problem i think with the breadcrums is that you don’t have the location switcher active, you should activate it in GeoDirectory>Design>Navigation>Show geodirectory navigation in selected menu locations or maybe add it as a shortcode in the sidebar (it shoudl be on everypage)
Stiofan
October 14, 2014 at 10:56 am #18306Thank you for taking a look.
Ok, I understand now. I will add the switcher, play around a bit and report back.
Thanks
CarstenOctober 14, 2014 at 11:07 am #18307Hi,
With the location switcher in place, it all makes sense now 🙂
One small issue: the switcher works find in the top menu, but doesn’t work properly when added as a shortcode to the sidebar. Upon selection of a country/region, the page doesn’t reload itself.
thanks
Carsten -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket