copyjosh
Forum Replies Created
-
The bug fix in 1.05 for fixing custom roles doesn’t appear to work… I am using the WP-Client plugin, and the plugin roles default with spaces/underscores. They are not working and applying this github pull code manually doesn’t resolve the issue…
Forum: Plugins
In reply to: [WPCasa] Insufficient Admin Permissions on ActivateThe cron function wasn’t hooked into an action, but was calling a method function directly. So the cron “job” was running continuously until it threw a stack overflow error… I added a ‘_cron’ suffix* to the scheduler name as depicted below. And then in the next code block, hooked the function call (“the job”) into the scheduler.
`/**
* cron()
*
* Setup custom cron jobs
*
* @uses wp_clear_scheduled_hook()
* @uses wp_schedule_event()
*
* @since 1.0.0
*/
public function cron() {// Handle delete previews cron
wp_clear_scheduled_hook( ‘wpsight_delete_listing_previews_cron’ );
wp_schedule_event( time(), ‘daily’, ‘wpsight_delete_listing_previews_cron’ );}`
`function wpsight_delete_listing_previews( $days = ” ) {
return WPSight_Listings::delete_listing_previews( $days );
}
add_action(‘wpsight_delete_listing_previews_cron’, ‘wpsight_delete_listing_previews’);
`This eliminated the stack overflow / infinite cron call / error….
Unfortunately still have to figure out why the other plugins aren’t setting admin privileges.
Forum: Plugins
In reply to: [WPCasa] Insufficient Admin Permissions on ActivateMy mistake.. should have used __DIR__ I suppose..
Error resolved by changing the line to this:create_function( “”, “include_once( ‘” . __DIR__ . “/includes/class-wpsight-install.php’ );” )
Now when I activate the plugin, it behaves appropriately and I can see the “Listings” admin menu on the left side, as such, the function in that file was run which added the Administrator role privileges that were previously missing.
But now I get a stack overflow error:
Fatal error: Stack overflow in /var/www/html/kscapital/wp-content/plugins/wpcasa/includes/class-wpsight-post-types.php on line 490
.
Line 489: // Delete old listing previews if desired
Line 490: if ( apply_filters( ‘wpsight_delete_listing_previews’, true ) )
wpsight_delete_listing_previews();Forum: Plugins
In reply to: [WPCasa] Insufficient Admin Permissions on ActivateSeems like the error is coming from this situation:
Warning: File not found: includes/class-wpsight-install.php
Since it cannot set the administrator roles from that file.. but it’s weird that the file is decidedly not found.
Line 104 from wpcasa.php:
register_activation_hook( basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ), create_function( "", "include_once( 'includes/class-wpsight-install.php' );" ), 10 );
I tried adding WPSIGHT_PLUGIN_DIR/includes/… but that didn’t resolve the issue either…
Any ideas still?
Thanks,
Josh
Forum: Themes and Templates
In reply to: [Twenty Twelve] style.css .current_page_ancestor, is it a typo?Yes it appears the generated class seems to be current-page-ancestor etc… this was confusing me too when trying to get it to work and didn’t notice the difference in source. Just created this account to try and report it lol.. not sure where to do that.