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
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.
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, 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"
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.
- 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.
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!
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:
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!
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.