Conversation
supportDear Neil, 1. I have noticed that whenever I include custom tax terms in a post, the featured image becomes “uneditable” 2. My error log gets 1 MB in 24 hours and it is full of mainly two errors PHP Notice: Trying to access array offset on value of type null in …/wp-includes/taxonomy.php on line 2774 saying $tt_ids[] = $term_info[‘term_taxonomy_id’]; Second massive error is Unknown column ‘db_term_relationships.term_taxonomy_id’ in ‘where clause’ query SELECT SQL_CALC_FOUND_ROWS db_posts.ID FROM db_posts WHERE 1=1 AND ( db_posts.ID NOT IN ( SELECT object_id FROM db_term_relationships WHERE term_taxonomy_id IN (some id numbers) ) term_id’s are from all taxonomies, both regular and custom, but one of them is always custom. PHP is 7.4, MySQL is 5.7 Thank you
@parmen , Thanks for raising this issue. Would it be possible to upload one of the definitions of a custom taxonomy where you are having the problem. I would hope to be able to create the taxonomy in my environment and then have the same problem – and to provide a fix if I can replicate it. Do you have any other plugins that affect taxonomies please? Thanks for your help, Neil James
Thanks for considering this issue. The problem perpetuated after I installed Smush or reSmush plugin to test-optimize some images. here is one of the taxonomies <?php add_action( 'init', 'register_staxo_en', 10 ); function register_staxo_en() { register_taxonomy( "en", array ( 0 => 'post', ), array ( 'name' => 'en', 'description' => '', 'labels' => array ( 'name' => 'Categories', 'singular_name' => 'Category', 'search_items' => 'Search Categories', 'popular_items' => 'Popular Categories', 'all_items' => 'All Categories', 'parent_item' => 'Parent Category', 'parent_item_colon' => 'Parent Category:', 'edit_item' => 'Edit Category', 'view_item' => 'View Category', 'update_item' => 'Update Category', 'add_new_item' => 'Add New Category', 'new_item_name' => 'New Category Name', 'separate_items_with_commas' => 'Separate categories with commas', 'add_or_remove_items' => 'Add or remove categories', 'choose_from_most_used' => 'Choose from the most used categories', 'not_found' => 'No Categories found', 'no_terms' => 'No Categories', 'items_list_navigation' => 'Categories list navigation', 'items_list' => 'Categories list', 'most_used' => 'Most Used', 'back_to_items' => '← Back to Categories', ), 'public' => true, 'publicly_queryable' => true, 'hierarchical' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'show_in_quick_edit' => true, 'show_admin_column' => true, 'capabilities' => array ( 'manage_terms' => 'manage_categories', 'edit_terms' => 'manage_categories', 'delete_terms' => 'manage_categories', 'assign_terms' => 'edit_posts', ), 'rewrite' => array ( 'slug' => 'en', 'with_front' => true, 'hierarchical' => true, 'ep_mask' => 0, ), 'query_var' => 'en', 'update_count_callback' => '', 'show_in_rest' => true, 'rest_base' => '', 'rest_controller_class' => '', 'sort' => false, ) ); } // Display Terms with Posts: content, excerpt // Display Terms Before text: Category: // Display Terms After text: /**Admin List screens for these post type(s) will have a filter list dropdown: post with wp_dropdown_categories parameters: array ( 'taxonomy' => 'en', 'show_option_all' => 'All Categories', 'orderby' => 'name', 'order' => 'ASC', 'show_count' => false, 'hide_empty' => false, 'hide_if_empty' => false, 'selected' => filter_input( INPUT_GET, \'en\', FILTER_SANITIZE_STRING ), 'hierarchical' => true, 'name' => 'en', 'value_field' => 'slug', ) **/ /**Terms control parameters set. Applies to posts with status: Published and Future only Notifications only if outside bounds will be given and user cannot change terms. No minimum number of terms. Maximum number of terms set to 2. **/ I have performed additional tests and CTR works fine with featured posts uploaded for new regular posts. Seems that the conflict is only with the Feedzy plugin importing posts from feeds. Whenever I include custom category in the import, the featured image gets out of reach, saying “There has been a critical error on this website.” End the error is in the first post.
Update: Think I found it. The conflict was in the setup of taxonomies. Generally defined as hierarchical, but on the admin page defined as flat, false, hence the error in db_term_relationships Tested Feedzy with the edited taxonomies and the featured image went through all edits, no error whatsoever. Unfortunately I cannot correct the situation with the images already submitted. So, it was my fault of negligence. Again, great plugin of yours. Like it better than CTI which has 1 million downloads. 😉
last update There is a small chance that the problem is in the choice of hierarchical custom taxonomies. When I turn all controls to hierarchy, featured image is no more available for edit. The posts syndicated with non-hierarchical (turned to false) custom terms have featured image accessible to edit in the file library. OR, the problem lies in the Feedzy cronjobs. This reply was modified 5 years, 4 months ago by Parmen .
@parmen , Thanks for raising this issue. Would it be possible to upload one of the definitions of a custom taxonomy where you are having the problem. I would hope to be able to create the taxonomy in my environment and then have the same problem – and to provide a fix if I can replicate it. Do you have any other plugins that affect taxonomies please? Thanks for your help, Neil James
Thanks for considering this issue. The problem perpetuated after I installed Smush or reSmush plugin to test-optimize some images. here is one of the taxonomies <?php add_action( 'init', 'register_staxo_en', 10 ); function register_staxo_en() { register_taxonomy( "en", array ( 0 => 'post', ), array ( 'name' => 'en', 'description' => '', 'labels' => array ( 'name' => 'Categories', 'singular_name' => 'Category', 'search_items' => 'Search Categories', 'popular_items' => 'Popular Categories', 'all_items' => 'All Categories', 'parent_item' => 'Parent Category', 'parent_item_colon' => 'Parent Category:', 'edit_item' => 'Edit Category', 'view_item' => 'View Category', 'update_item' => 'Update Category', 'add_new_item' => 'Add New Category', 'new_item_name' => 'New Category Name', 'separate_items_with_commas' => 'Separate categories with commas', 'add_or_remove_items' => 'Add or remove categories', 'choose_from_most_used' => 'Choose from the most used categories', 'not_found' => 'No Categories found', 'no_terms' => 'No Categories', 'items_list_navigation' => 'Categories list navigation', 'items_list' => 'Categories list', 'most_used' => 'Most Used', 'back_to_items' => '← Back to Categories', ), 'public' => true, 'publicly_queryable' => true, 'hierarchical' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'show_in_quick_edit' => true, 'show_admin_column' => true, 'capabilities' => array ( 'manage_terms' => 'manage_categories', 'edit_terms' => 'manage_categories', 'delete_terms' => 'manage_categories', 'assign_terms' => 'edit_posts', ), 'rewrite' => array ( 'slug' => 'en', 'with_front' => true, 'hierarchical' => true, 'ep_mask' => 0, ), 'query_var' => 'en', 'update_count_callback' => '', 'show_in_rest' => true, 'rest_base' => '', 'rest_controller_class' => '', 'sort' => false, ) ); } // Display Terms with Posts: content, excerpt // Display Terms Before text: Category: // Display Terms After text: /**Admin List screens for these post type(s) will have a filter list dropdown: post with wp_dropdown_categories parameters: array ( 'taxonomy' => 'en', 'show_option_all' => 'All Categories', 'orderby' => 'name', 'order' => 'ASC', 'show_count' => false, 'hide_empty' => false, 'hide_if_empty' => false, 'selected' => filter_input( INPUT_GET, \'en\', FILTER_SANITIZE_STRING ), 'hierarchical' => true, 'name' => 'en', 'value_field' => 'slug', ) **/ /**Terms control parameters set. Applies to posts with status: Published and Future only Notifications only if outside bounds will be given and user cannot change terms. No minimum number of terms. Maximum number of terms set to 2. **/ I have performed additional tests and CTR works fine with featured posts uploaded for new regular posts. Seems that the conflict is only with the Feedzy plugin importing posts from feeds. Whenever I include custom category in the import, the featured image gets out of reach, saying “There has been a critical error on this website.” End...
Update: Think I found it. The conflict was in the setup of taxonomies. Generally defined as hierarchical, but on the admin page defined as flat, false, hence the error in db_term_relationships Tested Feedzy with the edited taxonomies and the featured image went through all edits, no error whatsoever. Unfortunately I cannot correct the situation with the images already submitted. So, it was my fault of negligence. Again, great plugin of yours. Like it better than CTI which has 1 million downloads. 😉
last update There is a small chance that the problem is in the choice of hierarchical custom taxonomies. When I turn all controls to hierarchy, featured image is no more available for edit. The posts syndicated with non-hierarchical (turned to false) custom terms have featured image accessible to edit in the file library. OR, the problem lies in the Feedzy cronjobs. This reply was modified 5 years, 4 months ago by Parmen .