Forum Replies Created

Viewing 1 replies (of 1 total)
  • i solved the issue by using default values for the given variables (just the easy way):

    
    if (typeof current_status == 'undefined')
    	current_status = '';
    
    	if (typeof current_status_name == 'undefined')
    			current_status_name = '';
    
    	if (typeof ef_text_no_change == 'undefined')
    			ef_text_no_change = '';
    
    	if (typeof custom_statuses == 'undefined')
    			custom_statuses = null;
    
    	if (typeof status_dropdown_visible == 'undefined')
    			status_dropdown_visible=0;
    
    	if (typeof current_user_can_edit_published_posts == 'undefined')
    			current_user_can_edit_published_posts=0;
    
    	if (typeof current_user_can_publish_posts == 'undefined')
    			current_user_can_publish_posts=0;
    

    just put them into the custom-status.js above the first if.

    its because the <script>…</script> part of the custom-status.php is not loading on every page. so the variables become undefined.

    • This reply was modified 7 years, 9 months ago by sibbih.
    • This reply was modified 7 years, 9 months ago by sibbih.
    • This reply was modified 7 years, 9 months ago by sibbih. Reason: var before the variablename was wrong
Viewing 1 replies (of 1 total)