simonhayre
Forum Replies Created
-
Issue occures when the site has never had a document uploaded.
Forum: Hacks
In reply to: Go back two pages and refreshbut just check first that the code you are amending is the right file.
if you remove all the code we just added, are you still getting the issue.Forum: Hacks
In reply to: Go back two pages and refreshThats strange, I’m not getting that error anymore…?
double check that you’ve added the extra function and clause in the if statement.if(!is_user_logged_in() && !rcp_login_form_fields_is_login_page())
if there’s still no joy, debug it by putting the follow inside the rcp_login_form_fields_init function:
var_dump(rcp_login_form_fields_is_login_page()); exit;
it should return true if the url is on wp-login.php or wp-register.php
Forum: Hacks
In reply to: Go back two pages and refreshYeah, I would place it in functions.php of your theme
I just tried the code above and it just loop around.
So we need to identify if the user is on a login page to break the redirect.
Try this.add_action('init', 'rcp_login_form_fields_init'); function rcp_login_form_fields_init(){ if(!is_user_logged_in() && !rcp_login_form_fields_is_login_page()) { auth_redirect(); //redirect to login page, this also handles redirecting // them back to the current page when they've logged-in exit; //finished! } } function rcp_login_form_fields_is_login_page() { return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); }
see if this example gives you any joy.
Forum: Hacks
In reply to: Go back two pages and refresheasy…
add_action('init', 'rcp_login_form_fields_init'); function rcp_login_form_fields_init(){ if(!is_user_logged_in()) { auth_redirect(); //redirect to login page, this also handles redirecting // them back to the current page when they've logged-in exit; //finished! } }
if this isn’t what your after, have a look at how this is achieved, you might be able to replicate the wordpress function i.e.:
/wp-includes/pluggable.php Line 742And no, it wasn’t a Go Daddy setup.
Actually, got it working just a few hours ago.
It was a user issue for me, I hadn’t got the settings right.
All good now, cheers Ron.Simon
There is a warning on line 214 of domain_mapping.php. two ways to fix it…
1. in you wp_config.php file, add the following:
ini_set(‘error_reporting’, E_ALL);
this will stop warnings from being displayed.2. edit the file C:\xampp\htdocs\wp-content\mu-plugins\domain_mapping.php
amend to the following:function dm_edit_domain( $row = false ) { if ( is_object( $row ) ) { echo "<h3>" . __( 'Edit Domain', 'wordpress-mu-domain-mapping' ) . "</h3>"; } else { echo "<h3>" . __( 'New Domain', 'wordpress-mu-domain-mapping' ) . "</h3>"; $row->blog_id = ''; $row->domain = ''; $_POST[ 'domain' ] = ''; $row->active = 1; }
function dm_edit_domain( $row = false ) { if ( is_object( $row ) ) { echo "<h3>" . __( 'Edit Domain', 'wordpress-mu-domain-mapping' ) . "</h3>"; } else { echo "<h3>" . __( 'New Domain', 'wordpress-mu-domain-mapping' ) . "</h3>"; $row = new stdClass();//FIX $row->blog_id = ''; $row->domain = ''; $_POST[ 'domain' ] = ''; $row->active = 1; }
I to am having the same issue, newly installed wordpress 3.4.1.
I’ve got a few blogs, just can’t use this plugin. I’m guessing it’s a version issue?