Skip to content

[BUG] User with custom capabilities: elementor won't save the page/cpt #2846

@EdenK

Description

@EdenK

Users without the capability 'edit_posts' can't save pages or custom posts types that thay have edit capability.

Fix is require:
file: elementor/includes/editor.php line: 738

The function create_nonce should check for capabilities instead of using the constant
const EDITING_CAPABILITY = 'edit_posts';

This edit fix this issue

public function create_nonce() {
	if ( ! current_user_can('edit_'.get_post_type( $this->get_post_id() ) ) ) {
		return null;
	}

	return wp_create_nonce( self::EDITING_NONCE_KEY );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates a bug with one or multiple components.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions