Skip Navigation

[Resolved] Delete Post Type

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 7 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 6 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2462409
Screen Shot 2022-09-21 at 10.36.40 AM.png
Screen Shot 2022-09-21 at 10.06.31 AM.png

Tell us what you are trying to do?
I am trying to delete a certain post type. It doesn't have any custom fields, categories, or posts associated with it. I click the 'delete' just under the post title (in this case "cannabis posts") and it prompts me to confirm. I hit "OK" and it does nothing. Same goes for the Taxonomy section. Any non-built-in wordpress ones won't delete, either.
Is there any documentation that you are following?
No, just thought I could delete the post type.
Is there a similar example that we can see?
n/a
What is the link to your site? hidden link

#2462539

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for contacting Toolset support.

So that we can take a better look at this, could you please attach the Debug info?

You can see how to retrieve and paste it here: https://toolset.com/faq/provide-debug-information-faster-support/.

In addition to that, I'd also like your help enabling the WordPress debug mode.

To do so, please add the following code in wp-config.php file of your site:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
  
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
  
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
  
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

Please check following links to read more about debugging with WordPress.

https://codex.wordpress.org/Debugging_in_WordPress

https://codex.wordpress.org/Debugging_in_WordPress#Example_wp-config.php_for_Debugging

After doing that please try to remove that CPT once more, then check if you can find a file debug.log inside the wp-content folder. Open it and send us the last lines of log here in this ticket.

Thanks, please let us know.

#2462633

Thanks, Mateus. I have enabled Debug mode, and as you can see, I've attached the debug code from Toolset. Below is an entry from the log. I didn't find any logs within the WP-Content folder, just in the root directory of the wordpress install.

2022/09/21 22:30:06 [error] 37576#37576: *15478 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: gclid in /www/gravislawcannabis_933/public/wp-content/themes/bb-theme-child/functions.php on line 166PHP message: PHP Warning: Use of undefined constant get_gclid - assumed 'get_gclid' (this will throw an Error in a future version of PHP) in /www/gravislawcannabis_933/public/wp-content/themes/bb-theme-child/functions.php on line 167PHP message: WordPress database error Table 'gravislawcannabis.wp_yoast_indexable' doesn't exist for query SELECT * FROM `wp_yoast_indexable` WHERE `object_id` IN ('21776', '21749', '21746', '21743') AND `object_type` = 'post' made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Admin_Columns_Cache_Integration->fill_cache, Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_multiple_ids_and_type, Yoast\WP\Lib\ORM->find_many, Yoast\WP\Lib\ORM->run, Yoast\WP\Lib\ORM::executePHP message: WordPress database error Table 'gravislawcannabis.wp_yoast_indexable' doesn't exist for query SELECT * FROM `wp_yoast_indexable` WHERE `object_id` IN ('21776', '21749', '21746', '21743') AND `object_type` = 'post' made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Admin_Columns_Cache_Integration->fill_cache, Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_multiple_ids_and_type, Yoast\WP\Lib\ORM->find_many, Yoast\WP\Lib\ORM->run, Yoast\WP\Lib\ORM::execute" while reading response header from upstream, client: 64.146.131.20, server: staging-gravislawcannabis.kinsta.cloud, request: "POST /wp-admin/admin-ajax.php HTTP/1.1", upstream: "hidden link:", host: "staging-gravislawcannabis.kinsta.cloud:38109", referrer: "hidden link"

#2463105

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://toolset.com/privacy-policy-and-gdpr-compliance/#data-shared-with-our-support
**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

#2463289

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello again,

Thank you for providing the website credentials.

I have double-checked the problem, but so far I haven't been able to find a fix. I asked my colleagues to take a look to see if there's anything I'm missing.

I'll come back here as soon as one of them answers me (which shouldn't take long). Thank you in advance for your patience!

Regards,
Mateus.

#2463887

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks for your patience.

We have noticed some database errors for Yoast SEO and a missing database table, when enabling the debug mode. We also checked that you have a database clean-up plugin installed, to remove unused database tables, I'm afraid.

Our first suggestion would be to restore a possible backup that you maybe have taken before using the mentioned plugin to “clean up” the database. If you cannot do that, then I suggest deleting the related options to see if that can trick Types into recreating the missing database table. In this case, please disable Types, then try deleting the following options from the database:

toolset_executed_upgrade_commands
toolset_is_m2m_enabled
toolset_relationship_db_layer
wpdb_toolset_associations_version
wpdb_toolset_connected_elements_version
wpdb_toolset_relationships_version

Next, you should re-activate Types, and hopefully that fixes the problem related to the CPT exclusion. After this, please check whether the missing table wp_toolset_relationships has been created and try again to delete the CPT.

Another approach we can recommend is to contact Yoast support to see how they can fix the problem with the missing table that is filling the debug.log with these errors:

WordPress database error Table ‘gravislawcannabis.wp_yoast_indexable’ doesn’t exist for query

Please give those suggestions a try and let us know how they go. Thanks!

#2465149

I hadn't done a cleanup of the database yet; the plugin had already been installed. I believe the issue may lie with the Find/Replace function someone ran after cloning the site.

Thank you for the detailed instructions. Unfortunately, it didn't work. I will have to take a different tact, perhaps the one with the Yoast missing tables.

Thanks again,

Herb (Gravis Law Marketing)

#2465339

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Herb,

Thank you for the updates.

All right, if possible please contact the Yoast support team and address the issue with them. Then, keep us posted about your results.

Looking forward to your reply. Thanks!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.