404 not found

This topic contains 15 replies, has 2 voices, and was last updated by  Stiofan O’Connor 9 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #18183

    pawon
    Free User
    Post count: 34

    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: location

    In 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 fine

    But 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?

    #18184

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You can’t have a prefix and a post type with the same name, it will not work.

    Stiofan

    #18185

    pawon
    Free User
    Post count: 34

    But 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

    #18191

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I 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

    #18193

    pawon
    Free User
    Post count: 34

    Hi

    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

    #18195

    pawon
    Free User
    Post count: 34

    And 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

    #18196

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Please post ur wp-admin detail in a private reply and i will check your settings.

    Stiofan

    #18282

    pawon
    Free User
    Post count: 34
    This reply has been marked as private.
    #18284

    pawon
    Free User
    Post count: 34

    Some 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
    Carsten

    #18286

    pawon
    Free User
    Post count: 34

    OK. 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,
    Carsten

    #18289

    pawon
    Free User
    Post count: 34

    forgot screenshot..

    #18292

    pawon
    Free User
    Post count: 34

    ..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..

    #18301

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If 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

    #18306

    pawon
    Free User
    Post count: 34

    Thank you for taking a look.

    Ok, I understand now. I will add the switcher, play around a bit and report back.

    Thanks
    Carsten

    #18307

    pawon
    Free User
    Post count: 34

    Hi,

    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

Viewing 15 posts - 1 through 15 (of 16 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket