Underscorefunk
Forum Replies Created
-
I’m having the same issue on a fresh install.
Trying to get property of non-object in…
/wp-includes/capabilities.php on line 1165
/wp-includes/capabilities.php on line 1169
/wp-includes/capabilities.php on line 1171
/wp-includes/capabilities.php on line 1172
/wp-includes/capabilities.php on line 1175You should submit your fix to core for patching.
The filters you’re talking about definitely did. They worked like charm! Thanks so much for the fantastic plugin!
Looks like the solution is to use some of relevanssi’s filters instead. Here’s the solution. Hope this helps some folk out there. In this situation I wanted to selectively exclude an ’employees’ page and all child pages if the current user isn’t allowed to see ’employee content’
I’ll probably write a sql query that is more efficient to only grab IDs instead of get_pages. But this is proof of concept.
Also, the ID of 7324 for the employee page will be replaced with something more flexible and/or a theme option. ??
function uf_search_filter( $query_restrictions ) { if ( current_user_can( 'read_employee_only_content' ) ) { return $query_restrictions; } $pages = get_pages( 'child_of=7324' ); array_push( $pages, '7324'); foreach ( $pages as $page ) { $query_restrictions .= " AND doc != '" . $page->ID . "' "; } return $query_restrictions; } add_filter ( 'relevanssi_where' , 'uf_search_filter' );
I made an edit to sb_preserved_markup.php on Line 309 replacing WP_PLUGIN_URL with the plugins_url() function return.
wp_enqueue_script('emc2-pm-admin-js', WP_PLUGIN_URL .'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."admin.js?v=".$cachebuster);
became
wp_enqueue_script('emc2-pm-admin-js', plugins_url() . '/' . str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."admin.js?v=".$cachebuster);
Worked like a charm! ??
I’ve been struggling with this problem even with the latest version. I get the following error when I click on the Visual Tab:
Uncaught TypeError: Cannot call method 'apply' of undefined wp-tinymce.php:2
I noticed an error that might highlight why this is happening…
[blocked] The page at https://XXXXXXXXXXX/wp-admin/post.php?post=165954&action=edit ran insecure content from https://XXXXXXXXXXX/wp-content/plugins/preserved-html-editor-markup/admin.js?v=1.5&ver=3.3.1.
Disabling the preserved html editor plugin resolves the issue. Strangely enough, this only seems to pop up in Chrome…
Any ideas?
By the way, awesome plugin. The fact that this even exists makes me smile.
Peace,
John