[Resolved] Custom Post Types are Breaking Website

Home Forums Support [Resolved] Custom Post Types are Breaking Website

Home Forums Support Custom Post Types are Breaking Website

  • This topic has 17 replies, 2 voices, and was last updated 4 years ago by Tom.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1207846
    Anthony

    I’ve been discussing with the support over at Siteorigin for hours now and they seem to can’t figure out what’s going on and said to ask you guys.

    I can’t seem to get the Regular Pages and Custom Post Types to coexist.

    I’ve tried everything under the sun. Clearing cache, going to Settings > Permalinks and Clicking Save, deleting the Htaccess file and re-saving Permalinks, all kinds of plugin and theme conflict tests etc.

    As you can see here, this page (Custom post type called “Clients”) shows: https://koehlerrice.com/clients/westover-schools/

    But if you use the navigation to navigate to any other page (normal WP page), none of them work. Weirdly, the homepage works (if you click on the logo in the middle of the header).

    I’m on an apache server, and there’s no other caching that I can think of anywhere.

    I use Siteorigin and Generatepress for almost 30 websites and most of them have CPT’s without issues.

    Any help would be greatly appreciated.

    Thanks

    #1207925
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Perhaps your custom post type is set up incorrectly? Are you doing anything to the rewrites when setting it up?: https://wordpress.stackexchange.com/questions/53298/custom-post-type-url-rewriting

    If so, maybe remove those options to test?

    Other than that, I would look at your hosting to make sure the server is set up correctly.

    #1208652
    Anthony

    Man, this sucks!

    Siteorigin developer said there is no re-writes in place.

    The host company has no clue and suggested a new WP install. I put a new WP install on https://koehlerrice.com/new/ and created two custom posts (Using the Siteorigin CPT Plugin Addon).

    I added a page and one post from each of the custom posts.

    -1 x Page
    -1 x Client
    -1 x Project

    Everything works great….

    The problem is I can’t get the content over from the old WP install.

    I did a complete migration of the content (left the old WP installation behind) and the problem carried over with it.

    I’m under the impression it’s something in the Database?

    I’m hoping out of everyone someone can come up with an idea as to what’s happening I spent a lot of time on this site, unfortunately.

    Anyways, if you have any other ideas let me know.

    #1208755
    Anthony

    Not sure if this is of any value, but when I set the permalink to Numeric both the Stock WordPress Pages and the Custom Posts are working simultaneously.

    But when I put it back to Post Name or Custom Structure everything breaks again.

    #1209036
    Anthony

    I somehow resolved this. I’m not entirely sure how. Migrated the site numerous times then eventually changed the CPT names themselves and it resolved it.

    Thanks

    #1209054
    Tom
    Lead Developer
    Lead Developer

    Permalinks can be weird sometimes. Glad you got it working! 🙂

    #1209955
    Anthony

    Ahh! It’s back again. Out of nowhere the Pages just stopped showing and are showing this notice again

    Nothing Found
    Ready to publish your first post? Get started here.

    I tried migrating to a new WP install.
    I tried importing the data using a WPImporter onto a new install.

    I’m confused because I use Siteorigin and GeneratePress on another site of mine that uses custom post types without any issues.

    For some reason the Root page https://koehlerrice.com/ is still working, but every subdirectory of the root is showing that notice. And, the custom post types are displaying fine: https://koehlerrice.com/project/westover-campus-master-plan/

    Edit: Spoke to the Hosting Provider again and they checked everything possible and as far as htaccess, php, config files, all possible caching etc.

    Then when I mentioned that it had been working for about 20 hours (since last night), and then suddenly stopped working, they mentioned it must have to do with either the plugin or theme.

    Not sure if that makes sense considering it doesn’t work on any stock WP theme either

    Any other ideas?
    Thanks

    #1210172
    Tom
    Lead Developer
    Lead Developer

    It’s pretty difficult for us to diagnose, unfortunately. The theme itself wouldn’t do this, especially unprovoked.

    If it stopped working without you doing anything, I really doubt it’s a plugin or theme issue (unless there are cron events set up, but even then..).

    Do you at least know the code causing the issue? For example, if you remove the CPT, the issue goes away?

    #1210177
    Anthony

    Ok, cool.

    But ya, if I remove the CPT the regular pages become live again, yes. ]:

    #1210189
    Tom
    Lead Developer
    Lead Developer

    Then the issue must be in your CPT code.

    Have you compared it line by line to other CPTs you’ve created?

    #1210197
    Anthony

    I’m not even sure where to start with that. Are you talking about comparing it to another website in which I use the CPT from Siteorigin + GeneratePress? If so where is the code I’m looking through? In the plugin editor?

    #1210982
    Tom
    Lead Developer
    Lead Developer

    Isn’t SiteOrigin just a page builder? How are you adding your CPT? With code?

    #1210996
    Anthony

    With the premium version of Siteorign there’s a CPT addon.

    https://siteorigin.com/downloads/premium/

    #1211349
    Tom
    Lead Developer
    Lead Developer

    And they’re aware that the issue only happens when you activate the CPT using their plugin?

    I assume there’s something weird going on with the rewrite part of the CPT registration.

    #1211357
    Anthony

    I told him that once a couple of days ago yes.

    I’m going to reach back out and comment on the rewrite again and see what he says.

    Thanks for all your help Tom.

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