Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 5 years ago

#16772 closed defect (bug) (invalid)

Enabling support for Gallery format removed Gallery custom post type

Reported by: 10sexyapples's profile 10sexyapples Owned by: 10sexyapples's profile 10sexyapples
Milestone: Priority: normal
Severity: normal Version: 5.2.2
Component: XML-RPC Keywords:
Focuses: accessibility, javascript, administration, template, multisite, performance Cc:


After too many hours with no sleep I decided to flip on support for the new post formats ... took another couple hours until I realized that my "gallery" custom_post_type was no longer in the admin menu.

I gave myself a big doh! on the forehead for not considering that core might be using a "gallery" post type for this, but, then thought, not possible, the core dev team would never do that, they'd use a prefix ( like I'm kicking myself for not doing right now ).

I'm not sure exactly how it happened or why, and haven't had a chance to properly look into the database yet, but, wanted to get the info up here in case someone can spot the bug right away.

Change History (8)

#1 @dd32
13 years ago

  • Keywords reporter-feedback added

Custom Post types and Post Formats are stored differently. Post types are exactly that, Post types, Post Formats is simple metadata (stored in a Taxonomy).

These should not conflict with each other.

The only reason I can think of is that the you've copy-pasted a function into your theme and that function name exists, yet wrapped in a function_exists() check? (I've seen it before)

#2 @10sexyapples
13 years ago

Yes, I went into the database and then did some more reading ... to find that they are in fact basically taxonomy wrappers ... another doh! to close out the night.

And yeah, everything looked swell in the database ... I'm really stumped on this if it is in fact getting pointed back at me. I'm pretty good about using function_exists(), but, you're right, I should do another clean sweep. I'll report back to close this out if/when I find it.

Must leave it for tomorrow though, eyes are crossing~

#3 @10sexyapples
13 years ago

  • Owner set to 10sexyapples
  • Status changed from new to reviewing

Alright, so, I went through with a fine-toothed comb and there are no codes out of place, but, to be sure, I removed everything from the theme down to just index, header and footer with the only thing in the functions file being the registration of the custom post types, and all plugins off, and still my gallery menu item is no where to be found.

I created a new custom post type and it showed up in the menu just fine as it should. I then typed in the url for the missing post_type and got the cheatin'uh? message. I'm completely stumped and not to savvy at troubleshooting anything to do with the admin side of things. I looked at the core code pulling in the menu, and can't see anything I can use to troubleshoot.

I'm at a standstill on this. It really makes no sense whatsoever, but, as I'm at the tail end of this site and it's on the verge of golive ... and I'm lucky enough that only two posts have been made in the gallery post type admin, I am going to recreate a new custom post type that doesn't reference the word gallery ... tsa_gallery for the post_type itself and move forward.

I'm not one to leave cobwebs hanging about though, so, will keep at this until it's worked out. Is there any kind of debug function I can run to test what is being returned when the admin menu is called there? I'm going to move over to support once I hear back from you ... I obviously jumped the gun coming straight here. My apologies for that.

#4 @dd32
13 years ago

Post some code that shows the problem, and we'll see if we can figure out what is going on.

#5 @10sexyapples
13 years ago

Well, I'm happy to report that my gut instinct regarding it being something to do with capabilities proved correct, that, and that my face is red with embarrassment at the moment for jumping to the conclusion that this was a bug instead of my own failing somewhere. Turns out I've been foiled again by working til my eyes are crossed ...

'capabilities' => $capabilities,

is your friend.

Apparently once I got down that far in assigning capabilities to my custom post types, after the fact, I neglected to copy paste that one in.

My apologies again for wasting your time and thank you so much for being so understanding and helpful.
I'll keep trying to wear the big pants til they fit ... ;-)

#6 @duck_
13 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reviewing to closed

#7 @ravikarn2708
5 years ago

  • Component changed from General to HTTP API

#8 @ravikarn2708
5 years ago

  • Component changed from HTTP API to XML-RPC
  • Focuses accessibility javascript administration template multisite performance added
  • Version set to 5.2.2
Note: See TracTickets for help on using tickets.