Conversation
supportHello, thanks for your plugin ! Some warnings break the select field in settings making it unusable (url : options-general.php?page=yikes-simple-taxonomy-ordering) : Warning: Attempt to read property "name" on null in C:\wamp64\www\xxx\wp-content\plugins\simple-taxonomy-ordering\lib\options.php on line 147 Warning: Attempt to read property "labels" on null in C:\wamp64\www\xxx\wp-content\plugins\simple-taxonomy-ordering\lib\options.php on line 147 Thanks
Hi @fherewecom , Could you provide a list of any custom post types and taxonomies on the site, and how you have generated them? You may have some sort of orphaned taxonomy that doesn’t apply to any post types, which is causing the “check which post type this taxonomy belongs to” code to fail. Jon
After research, the error appears with two taxonomies created by polylang. I solved the problem, but, Polylang having a large number of users, i think it would be better to register these two taxonomies in the global exclusion list of the “get_taxonomies” function in lib/options.php. And at least ensure that the display is not broken if a taxonomy has no name or labels function fixSimpleTaxonomyOrderingSelector($excluded_taxonomies, $taxonomies) { array_push($excluded_taxonomies, 'term_language', 'term_translations'); return $excluded_taxonomies; } add_filter('yikes_simple_taxonomy_ordering_excluded_taxonomies', 'fixSimpleTaxonomyOrderingSelector', 10, 2); This reply was modified 3 years, 11 months ago by f.herewecom .
Hi @fherewecom , Could you provide a list of any custom post types and taxonomies on the site, and how you have generated them? You may have some sort of orphaned taxonomy that doesn’t apply to any post types, which is causing the “check which post type this taxonomy belongs to” code to fail. Jon
After research, the error appears with two taxonomies created by polylang. I solved the problem, but, Polylang having a large number of users, i think it would be better to register these two taxonomies in the global exclusion list of the “get_taxonomies” function in lib/options.php. And at least ensure that the display is not broken if a taxonomy has no name or labels function fixSimpleTaxonomyOrderingSelector($excluded_taxonomies, $taxonomies) { array_push($excluded_taxonomies, 'term_language', 'term_translations'); return $excluded_taxonomies; } add_filter('yikes_simple_taxonomy_ordering_excluded_taxonomies', 'fixSimpleTaxonomyOrderingSelector', 10, 2); This reply was modified 3 years, 11 months ago by f.herewecom .