WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I can't access my Custom Post Type posts after 3.1 update! (17 posts)

  1. Ian
    Member
    Posted 3 years ago #

    I upgraded to 3.1 and while it seems like all my info is intact, I'm having some very serious problems. First of all, the "if" sequence in my php isn't sending to the right single files anymore. Trying the new system of single-CUSTOMPOSTTYPENAME.php doesn't seem to work either.

    Second, I liked the permalink structure /POST-TYPE/post-name/. Is there any way to get that back?

    Perhaprs most importantly, wordpress won't let me edit any of my custom posts anymore! It's as if they were created by another user and I don't have permission!

    http://www.tradereadingorder.com/list/comics/marvel-universe/

    The content is still displaying fine on the index page, but the single books just defaul to the index again.

  2. Ian
    Member
    Posted 3 years ago #

    do you think these problems may be caused by the fact that my post types originally were uppercase?

  3. Ian
    Member
    Posted 3 years ago #

    it seems like they're now lowercase ie

    wp-admin/edit.php?post_type=marvel

    but maybe the original posts still have the uppercase letter?

  4. Ian
    Member
    Posted 3 years ago #

    I found this code:

    if(!get_option('custom_type_updated')){
    global $wpdb;
    $wpdb->query("UPDATE $wpdb->posts SET post_type = 'portfolio' WHERE post_type = 'Portfolio'");
    update_option('custom_type_updated','true');
    }

    http://wordpress.org/support/topic/31-rc3-uppercase-custom-post-type-problems?replies=13

    and I'm gonna try that

  5. Ian
    Member
    Posted 3 years ago #

    This seems to have worked for the first one! It also fixed the permalink structure (back to /type/post/) and got the if in the single.php working!

    I'll try it for the others and report back

  6. Ian
    Member
    Posted 3 years ago #

    It worked for the first two, but now it isn't working :-/

    any ideas? Did using it a couple times make it not work? I was changing the variables each time

  7. Ian
    Member
    Posted 3 years ago #

    weird, I had to do it as

    if(!get_option('marvel2_update')){
    global $wpdb;
    $wpdb->query("UPDATE $wpdb->posts SET post_type = 'marvel' WHERE post_type = 'marvel'");
    update_option('marvel2_update','true');
    }

  8. Ian
    Member
    Posted 3 years ago #

    it's working now for the other ones. a couple of them must have gotten double messed up or something.

  9. I swear I read something about just THIS today...Something about how you had to fix them.

  10. Ian
    Member
    Posted 3 years ago #

    it all seems to be working now, nearly gave me a heart attack, though. sorry for the frantic posting while I figured it out, haha.

    The capitalization fix seems to have solved the permalink structure thing the single.php if swithc AND the edit link disappearing as well.

  11. Ian
    Member
    Posted 3 years ago #

    yeah, that's where I got the update code. My problem was that my old posts were still in limbo because they thought they had an uppercase character. Everything seems to be fine now though :D

  12. Yeah, you need to search/replace the DB for the rest of it. (God and I posted in that old topic too!)

  13. Ian
    Member
    Posted 3 years ago #

    yup, I used the Search and Replace plugin to clean up the old links. I think it's as good as its going to get. Not much I can do about outside links anyway.

  14. djanym
    Member
    Posted 3 years ago #

    it did not helped me... and i have custom post type in lower case. any suggestions?

  15. djanym - please make a new topic with a descriptive title.

    Share the code you're using for your CPTs.

    Once a topic is resolved, we kinda stop patrolling it.

  16. djanym
    Member
    Posted 3 years ago #

    thanks, i've found solution

Topic Closed

This topic has been closed to new replies.

About this Topic