0
votes

I just update my Wordpress to newest version but there some problem on catagory on admin page (edit-tags.php?taxonomy=product_cat&post_type=product) which quite weird.

When I goes to the product catagory edit page, where ever I click it will only activate the category color option, and can't do anything else. (image below)

enter image description here

Here below the error I got after click something there,

Uncaught TypeError: Cannot read property 'removeClass' of undefined at a.(anonymous function).(anonymous function).open (/wp-admin/load-scripts.php?c=1&load%5B%5D=hoverIntent,common,admin-bar,wp-ajax-response,admin-tags,wp-a11y,inline-edit-tax,svg-painter,heartbeat,wp-auth-check,jquery-ui-s&load%5B%5D=lider,jquery-ui-draggable,jquery-touch-punch,iris,wp-color-picker,jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete,under&load%5B%5D=score,shortcode,backbone,wp-util,wp-backbone,media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,me&load%5B%5D=dia-audiovideo,mce-view,imgareaselect,image-edit,farbtastic&ver=4.9.1:288:2816) at a.(anonymous function).(anonymous function).open (/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload&ver=4.9.1:32:1032) at HTMLAnchorElement. (/wp-content/themes/accessories-shop/framework/admin/inc/js/wp-color-picker-alpha.js?ver=1.1.0:12:2477) at HTMLAnchorElement.dispatch (/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload&ver=4.9.1:3:12444) at HTMLAnchorElement.r.handle (/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload&ver=4.9.1:3:9173)

Every thing I click there only response to the Category Color option, and I even don't remember its there before. This problem only appear on the category only, when I open the tag which share same script (edit-tags.php?taxonomy=product_tag&post_type=product), it working just fine. Please help me solve this problem, thanks.

1
that option isn't from woocommerce, you have to know which plugin added that options and write a support ticket - silver
Do you mean category option? I think that option from woocommerce, because when I deactivate woocommerce plugins its also gone, but that category color I am not sure, I think its from the theme. - Willy Abimanyu

1 Answers

0
votes

After some research through, I found the cause. This code from the custom theme that I used added an element to the category, to edit category color. (/framework/function/theme-colored-categories.php).

function accessories_shop_add_category_color() {
wp_register_script('accessories-shop-settings-js', get_template_directory_uri() . '/framework/admin/settings/js/cmsmasters-theme-settings.js', array('jquery', 'farbtastic'), '1.0.0', true);

wp_localize_script('accessories-shop-settings-js', 'cmsmasters_setting', array( 
    'palettes' => implode(',', cmsmasters_color_picker_palettes()) 
));


wp_enqueue_script('accessories-shop-settings-js');

?>
<div class="form-field">
    <label for="term_meta[cmsmasters_cat_color]"><?php esc_html_e('Category Color', 'accessories-shop'); ?></label>
    <input type="text" id="term_meta[cmsmasters_cat_color]" name="term_meta[cmsmasters_cat_color]" value="" class="cmsmasters-color-field" data-alpha="true" data-reset-alpha="true" />
</div>
<?php

}

After I command this function, the category edit page now become accessible. Thanks for your help.