• Resolved looklab

    (@looklab)


    I am running a danish version of wordpress 3.1.

    I have 7 subdomain-site but suddenly i can’t add a new site.

    When i enter the sites address, title and admin email address i get a page that says Are you sure you want to do this? Please try again (Er du sikker p?, at du vil g?re dette? pr?v venligst igen).

    There is no yes button – how can i create a new subdomain site ? please help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Have you made any other changes recently?

    Normal debugging practice is to turn off all your plugins and try again.

    Thread Starter looklab

    (@looklab)

    I have upgraded from version 3.0 -> 3.1 since I added the latest blog.
    I have moved to a faster server
    My plugins are the same as last time, when it worked.
    I have tried Debug, true but it doesnt give me an error.

    Thread Starter looklab

    (@looklab)

    I have now tried to upgrade to wordpress 3.1.1-da_DK and then I couldnt access the admin/network.

    I changed the code

    if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) {

    to

    if ( ( ! is_main_site() ) ) {

    in wp-admin/netowrk/admin.php

    and I can now access the netword admin pages, but I can still not create a new blog..

    No errors in the logs. ??

    Thread Starter looklab

    (@looklab)

    I have noticed there is no validation at all – it says the same error everytime even if i doesnt enter anything:

    Are you sure you want to do this? Please try again

    Thread Starter looklab

    (@looklab)

    I have tracked it down and it is the function

    check_admin_referer( 'add-blog', '_wpnonce_add-blog' );

    function check_admin_referer($action = -1, $query_arg = '_wpnonce') {
    	$adminurl = strtolower(admin_url());
    	$referer = strtolower(wp_get_referer());
    	$result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;
    	if ( !$result && !(-1 == $action && strpos($referer, $adminurl) === 0) ) {
    		wp_nonce_ays($action);
    		die();
    	}
    	do_action('check_admin_referer', $action, $result);
    	return $result;
    }

    that makes the error.

    If i do not call this function I get the error:

    Can’t create an empty site.

    Thread Starter looklab

    (@looklab)

    Solved:

    define( 'DOMAIN_CURRENT_SITE', 'DOMAIN.dk' );

    changed to

    define( 'DOMAIN_CURRENT_SITE', 'www.DOMAIN.dk' );

    and then it all worked again

    I had the same problem but I had allready https://www.DOMAIN.dk so I did the reverse and I could add a new site again.

    So:

    define( ‘DOMAIN_CURRENT_SITE’, ‘www.DOMAIN.dk’ );

    changed to

    define( ‘DOMAIN_CURRENT_SITE’, ‘DOMAIN.dk’ );

    It would be interesting to know why this matters?

    because an address with www is technically a *different* address than a url without it.

    Not to humans, but to machines it does matter.

    Hi Andrea,
    I understand that it is different but how come looklab had to to change it to with www and I had to do the reverse from with to without www?

    Because his server was set up for the reverse.

    But what I don’t understand is the following:
    I first set it up with https://www.DOMAIN.dk and was able to add new sites and after the WordPress upgrade I wasn’t able to add sites.

    When I changed https://www.DOMAIN.dk to DOMAIN.dk I was able again to add it.

    But if the setup was wrong initially. Why could I add sites before the upgrade and not after?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Because somewhere in there, probably, you had it listed as DOMAIN.dk when you set it up. The reason it breaks is because there’s a miss-match going on. It used to elegantly handle it, now it’s persnickety.

    It must be, I just can’t remember I changed it.

    Whatever. Thank you for your explanation.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can't add subsite’ is closed to new replies.