Custom Post Type 404 Error

Support Meta Box AIO Custom Post Type 404 Error

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #29751
    mjmurphy53711@gmail.com[email protected]
    Participant

    Really wierd thing just now.

    I setup two custom post types using all the same parameters. "Reviews" and "States".

    Both worked fine, and displayed the content fine on all pages.

    I was trying to add a featured image to one of the "state" pages, and all of a sudden all state pages are now 404. "Review" pages are still fine. I've compared all settings on both, identical - as is all structure and it's the exact same type of content.

    https://staging-bettingusa.kinsta.cloud/states/al/ = 404
    https://staging-bettingusa.kinsta.cloud/reviews/betmgm/ = just fine.

    How do I troubleshoot this? I've reset permalinks several times.

    #29756
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If this is the link of a single state https://staging-bettingusa.kinsta.cloud/states/al/
    then this link should be the archive state page https://staging-bettingusa.kinsta.cloud/states/

    But it links to a single page. So I think there is a page that has the same slug as the archive page. Or you've changed the permalink of the state post type.

    Please re-check both cases and let me know how it goes.

    #29762
    mjmurphy53711@gmail.com[email protected]
    Participant

    I have archives disabled, it worked fine - until it didn't. I don't know how to trouble shoot this, but it's not that. Plus both cases are setup the exact same way, one works and the other throws 50 404.s

    #29764
    mjmurphy53711@gmail.com[email protected]
    Participant

    Would greatly appreciate an extra level of support on this - It's my first time creating a custom post and I'm anxious to get back to work - this stopped me in my tracks yesterday and I'm waiting for some clarity, thanks!

    #29772
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please try to change the slug states of this page https://staging-bettingusa.kinsta.cloud/states/ to another slug name such as states-page then re-save the permalink.

    If it still does not work, please share your site info via this contact form. I will help you to check it.

    #29795
    mjmurphy53711@gmail.com[email protected]
    Participant

    Which contact form? I can't publicly post my login details obviously.

    I don't understand why changing that one slug would fix this - when the other (working) CPT has the exact same setup.

    Reviews and a slug of /reviews/ with sub pages of /reviews/example/

    Just like slug of /states/ and sub pages of /states/example/ but one works and the other doesn't.

    Can't spend a week on this so please provide some helpful support - even if I change the slug as you requested, let's say it fixes it - I still need that page to have that slug, so let's actually help here instead of providing half way answers once a day please.

    #29799
    Long NguyenLong Nguyen
    Moderator

    Hi,

    It's not the problem of the plugin itself, just a conflict slug of WordPress when a CPT and page have the same slug. Then WordPress will load the page with high priority and there is no child page with this URL /states/abcd

    So you need to change the page slug or change the CPT slug to avoid this conflict.

    #29800
    mjmurphy53711@gmail.com[email protected]
    Participant

    You keep ignoring the fact that the other CPT is the exact same scenario and isn't broken! I need a higher level of support please, I'm getting very frustrated with your replies.

    #29802
    mjmurphy53711@gmail.com[email protected]
    Participant

    You are giving AWFUL support here. Not helpful at all, incomplete instructions - and completely ignoring one scenario working and the other not. You are wasting both of our time for 3 days now giving horrible answers.

    If one CPT works just fine with this setup, and the other DID WORK FINE until SOMETHING CHANGED, clearly something else is going on - but you keep rushing through the support replies and not helping at all, forcing us to keep going in circles about this.

    Please escalate to a support person who is actually willing to look at my issue and let's not go another day/s to figure it out please.

    #29805
    Anh TranAnh Tran
    Keymaster

    Hi Mike,

    Sorry for the experience.

    What Long was trying to tell you is that: there's a single page with the slug stages (https://staging-bettingusa.kinsta.cloud/states/), which might break how WordPress creates the permalink structure for single state page. I guess you don't have a single page with the slug reviews, do you? That's the difference between them.

    By the way, I see you setup a reviews page like this (https://staging-bettingusa.kinsta.cloud/reviews/reviews/), can you share how did you set it up? It's not a single page, which explains why it works for reviews, but not states.

    #29806
    mjmurphy53711@gmail.com[email protected]
    Participant

    I just don't know how to explain myself further - the /states/ and /reviews/ pages are both the exact same setup. Parent page with sub pages.

    The parent pages of /states/ and /reviews/ and all 127 sub pages associated with them (/states/florida/ and /reviews/betmgm/) are all the exact same setup. Page and sub page.

    As mentioned, I created a CPT for each, disabled archives, and all worked fine - while working on a page, suddenly all the /states/ sub page CPT's went to 404, while reviews sub page CPT's continue to work just fine.

    We are still running in circles here but I am grateful to have some eyeballs helping.

    #37260
    brandonjpbrandonjp
    Participant

    I have this same exact same issue VERY often... even when there is no static page with the same slug. I don't understand what causes it, but here's how I usually fix it...

    1. change the slug of the CPT to something random/unique
    2. go to: /wp-admin/options-permalink.php & change the permalink structure
    3. go back to your CPT and change the slug back to what you want
    4. go back to: /wp-admin/options-permalink.php & change the permalink structure to what you want

    Usually that fixes it for me.

    #39277
    winzer@8px.com[email protected]
    Participant

    saving the permalink structure in wp fixed that for me.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.