• Resolved controvi

    (@controvi)


    Hello,

    For some reason all but 1 of my cpt have dissapeared.
    I started working today and wanted to change a cpt that has been in the edit list since it was made.
    Now suddenly it is gone.
    My guess is that that happened after I added a new one last week on friday but that’s a wild guess.

    The cpt are still in the admin menu of wordpress and the website can still get the posts from the cpt’s.

    Would you have any idea why this is happening ?
    Or at least how I can get the post types back to be seen by cpt ui?

    Awaiting your reply.

    Cheers and have a good day

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    So the post types, specifically the settings for them, disappeared from the CPTUI settings only? Everywhere else is apparently showing the post type content and the admin menus?

    Is it possible that some got moved to getting registered elsewhere like your theme or a quick custom plugin to handle?

    Other than that, can’t say for sure what’s going on, as it sounds like it may just be a case of some data loss for 1 option in the options table. If you have a recent backup at all, it’d be possible to retrieve. If you’re willing to get your hands “dirty” with editing the database directly, it’d be possible to retrieve everything for CPTUI and restore JUST those options.

    Thread Starter controvi

    (@controvi)

    Hey Michael,
    Thank you for your reply.
    I have been looking into the issue more and found that , like you said, some data was lost.

    I found the cptui_post_types field in the database was only containing the last post type I added.

    Now I have no clue what has caused it but luckily I have another database that has the same post types. (accept for the last one I added).
    So I copied the database field from the other page and sure enough all the post types are again visible.

    But when I add the latest post type to the database value (de-serialized added cpt and serialized again) it didn’t show in wordpress.

    Now you could say I had made a mistake somewhere in the code but I removed one of the first from the array of cpt’s and suddenly the last one showed up.

    I am guessing at the moment that it has something to do with the fact that I currently have 9 CPT’s and am adding a 10th.

    Would you know if there could be an issue on that department ?

    Cheers

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Can you send over the value in the textarea on the right when you visit CPTUI > Tools and from the “Post Types” tab? That’ll allow me to import your current settings and see if I can recreate at all.

    As a whole, the only limit I can think of there would be just that you’re hitting some sort of data storage limit for a given option row, but last I knew, that limit was actually quite high, and not something our options would probably be reaching.

    Thread Starter controvi

    (@controvi)

    I added the cpt’s as when they did all show.
    Now I added the 10th cpt to it and that started showing again.
    But for some reason all the post types that are now showing accept the last added can be edited but don’t do anything to the post types that were originally gone.

    Below is the code you asked for.
    Hope you can find anything.

    {"faqs":{"name":"faqs","label":"FAQs","singular_label":"FAQ","description":"","public":"false","publicly_queryable":"false","show_ui":"true","show_in_nav_menus":"false","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"vraag-en-antwoord","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-welcome-learn-more","supports":["title","editor","thumbnail"],"taxonomies":["category"],"labels":{"menu_name":"FAQs","all_items":"All FAQs","add_new":"Add FAQ","add_new_item":"New FAQ","edit_item":"Edit FAQ","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"voor-de-pers":{"name":"voor-de-pers","label":"Pers","singular_label":"Pers","description":"Pers berichtenn","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-admin-site","supports":["title","editor"],"taxonomies":[],"labels":{"menu_name":"Pers","all_items":"Alle berichten","add_new":"Nieuw bericht","add_new_item":"Nieuw bericht","edit_item":"Wijzigen","new_item":"Nieuw Bericht","view_item":"Bekijk bericht","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"usps":{"name":"usps","label":"USP's","singular_label":"USP's","description":"","public":"false","publicly_queryable":"false","show_ui":"true","show_in_nav_menus":"false","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"in_het_nieuws":{"name":"in_het_nieuws","label":"In het nieuws","singular_label":"In het nieuws","description":"","public":"false","publicly_queryable":"false","show_ui":"true","show_in_nav_menus":"false","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"team":{"name":"team","label":"Team Members","singular_label":"Team Member","description":"","public":"false","publicly_queryable":"false","show_ui":"true","show_in_nav_menus":"false","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-businessman","supports":["title","editor","thumbnail"],"taxonomies":["category"],"labels":{"menu_name":"Team members","all_items":"All members","add_new":"New member","add_new_item":"Add new member","edit_item":"Edit member","new_item":"New member","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"media_quotes":{"name":"media_quotes","label":"Quotes","singular_label":"Quote","description":"","public":"false","publicly_queryable":"false","show_ui":"true","show_in_nav_menus":"false","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"false","rewrite_slug":"","rewrite_withfront":"false","query_var":"false","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-format-quote","supports":["title"],"taxonomies":[],"labels":{"menu_name":"Quotes","all_items":"All Quotes","add_new":"Add Quote","add_new_item":"Add New Quote","edit_item":"Edit Quote","new_item":"New Quote","view_item":"View Quote","search_items":"Search Quote","not_found":"Quote Note Found","not_found_in_trash":"No Quotes Found in Trash","view_items":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"partners_samenwerken":{"name":"partners_samenwerken","label":"Partners - samenwerking","singular_label":"Partners - samenwerking","description":"","public":"false","publicly_queryable":"false","show_ui":"true","show_in_nav_menus":"false","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"true","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"customers":{"name":"customers","label":"Customers","singular_label":"Customer","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"false","rewrite_slug":"","rewrite_withfront":"false","query_var":"false","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-id-alt","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"flight_cancellation_compensation":{"name":"flight_cancellation_compensation","label":"Cancelled v2","singular_label":"Cancelled","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"true","rewrite":"true","rewrite_slug":"vlucht-geannuleerd","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-cloud","supports":["title","custom-fields","page-attributes"],"taxonomies":["category"],"labels":{"menu_name":"Cancelled","all_items":"All items","add_new":"New item","add_new_item":"New item","edit_item":"Edit item","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""},"flight_delay_compensation":{"name":"flight_delay_compensation","label":"Delayed","singular_label":"Delayed","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","show_in_rest":"false","rest_base":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"vlucht-vertraagd","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-cloud","supports":["title","revisions","page-attributes"],"taxonomies":["category"],"labels":{"menu_name":"Delayed","all_items":"All items","add_new":"New item","add_new_item":"New item","edit_item":"Edit item","new_item":"New item","view_item":"View item","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":""},"custom_supports":""}}

    • This reply was modified 7 years, 1 month ago by controvi.
    • This reply was modified 7 years, 1 month ago by controvi.
    • This reply was modified 7 years, 1 month ago by Geoffrey Shilling. Reason: Added code tag
    • This reply was modified 7 years, 1 month ago by Geoffrey Shilling.
    Thread Starter controvi

    (@controvi)

    NEW UPDATE:
    I found out why all the post types were still registered somewhere.
    As you said in your first reply you mentioned that the post types should be registered somewhere else because cpt ui doesn’t see them anymore.
    But I just found out that there apparently is a bug or something happened that made the database different from the cpt_ui.php file that (I guess) is generated by cpt ui.

    When I opened that file all the register functions where there.

    So it seems something happened after adding the the 10th cpt last week.

    Any idea how this can happen, apart form editing the database manually ?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    nope, sadly I don’t. CPTUI doesn’t generate any files either, like the cpt_ui.php file mentioned. Someone else on the project must have done that, or perhaps it was a file used before CPTUI got added. We stick with what’s saved to the two options we save in the database. Order in which WordPress reads things would play a part, as the later the version registered, the latter is the one used. If I register “food_types” from a plugin on init, priority 10, and then also in functions.php on init priority 10, the functions.php version will be what’s used since it runs later than the plugin.

    Thread Starter controvi

    (@controvi)

    That explains a lot and has let us to the answer that it was probably someone here in the office when setting up the project.

    We never knew that that file was keeping the post types in wordpress and we thought that once the code was run it was added to the database.

    So that is the issue here.
    Nothing wrong with the plugin in the end.
    Glad even that it was just us.

    Thank you for taking the time to help out and set us on the correct path.
    Cheers

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome. For what it’s worth, post types have always been registered and run at the time of loading a page. CPTUI itself simply stores the arguments to be used at that time ??

    Let us know if anything else comes up.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘All but 1 cpt dissapeared’ is closed to new replies.