Support » Plugin: Edit Flow » Uncaught ReferenceError: current_user_can_publish_posts is not defined

  • After updating to the latest version, I’m getting this error when I visit the Pages listing in WP Admin:

    Uncaught ReferenceError: current_user_can_publish_posts is not defined

    Line 111: /wp-content/plugins/edit-flow/modules/custom-status/lib/custom-status.js

    I am using custom statuses. Happy to help with reproduction steps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m seeing this as well, and it’s preventing me from bulk editing. Anyone have this issue?

    Yes, happening here too. Also using custom statuses.

    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 2 years, 5 months ago by sibbih.
    • This reply was modified 2 years, 5 months ago by sibbih.
    • This reply was modified 2 years, 5 months ago by sibbih. Reason: var before the variablename was wrong
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught ReferenceError: current_user_can_publish_posts is not defined’ is closed to new replies.