wpcrea
Forum Replies Created
-
A small fix to the patch above.
The line:
add_action('login_init','FSREP_login_init');
should read:
add_action('wp_loaded','FSREP_login_init');
I think that’ll do it.
ok, I couldn’t let it go. So, I applied a patch – it seems to work!
The patch defers the call to the wp_get_current_user until the initialization is complete. The patch is as follows:
– module: ../fs-real-estate-plugin/define.php
– at line 11 – you will see the following code:// SET PERMISSION LEVEL if (!function_exists('wp_get_current_user')) { include(ABSPATH.'wp-includes/pluggable.php'); } $FSREPCurrentUser = wp_get_current_user(); if (isset($FSREPCurrentUser->roles[0])) { $FSREPCurrentPermission = $FSREPCurrentUser->roles[0]; } else { $FSREPCurrentPermission = '';}
replace this with the following:
// SET PERMISSION LEVEL function FSREP_login_init() { if (!function_exists('wp_get_current_user')) { include(ABSPATH.'wp-includes/pluggable.php'); } $FSREPCurrentUser = wp_get_current_user(); if (isset($FSREPCurrentUser->roles[0])) { $FSREPCurrentPermission = $FSREPCurrentUser->roles[0]; } else { $FSREPCurrentPermission = ''; } } add_action('login_init','FSREP_login_init'); $FSREPCurrentPermission = '';
I have the same problem. I have a fresh install of WordPress multisite and installed this plugin. Immediately after installing and activating this plugin, I have the same issue.
If you rename the plugin folder to something else (i.e. fs-real-estate-plugin.hold) you will get your system back.
The error occurs in the initialization of the plugin in the multisite configuration at least. I’ve looked at it enough to see what is going on – I’m not sure if I’ll patch it or if I’ll just move on to another plugin for real-estate.
If you turn on warnings in your configuration – you will see the following message:
Notice: Use of undefined constant AUTH_COOKIE – assumed ‘AUTH_COOKIE’ in /home/bob/workspace/wpress/wp-includes/pluggable.php on line 619
You do not have sufficient permissions to access this page.
Here is the trace of where the problem occurs during the initialization of the plugin:
- wp_parse_auth_cookie(): /wpress/wp-includes/pluggable.php at line 619
- wp_validate_auth_cookie(): /wpress/wp-includes/pluggable.php at line 521
- get_currentuserinfo(): /wpress/wp-includes/pluggable.php at line 100
- wp_get_current_user(): /wpress/wp-includes/pluggable.php at line 54
- /wpress/wp-content/plugins/fs-real-estate-plugin/define.php at line 15
- /wpress/wp-content/plugins/fs-real-estate-plugin/main.php at line 73
- /wpress/wp-settings.php at line 166
- /wpress/wp-config.php at line 103
- /wpress/wp-load.php at line 30
- /wpress/wp-login.php at line 12
The problem is occuring because the plugin is trying to process authentication before initialization is complete. I think that it could/should create an authentication action to be processed during wp authentication processes after initialization is complete.
Forum: Plugins
In reply to: [Displet RETS / IDX Plugin] CREA DDFI read the thread that you refer to. That post went offline without a final conclusion posted. I has hoping that the offline chatter might have gone somewhere.