WordPress.org

Ready to get started?Download WordPress

Forums

Site admin URL repeats website domain ending in 404 (13 posts)

  1. c3iq
    Member
    Posted 1 year ago #

    Hello. Yesterday I updated my install including 24 plugins and WordPress 3.5.1. During the Network Update the machine started to thrash and processes started dropping the connection to the database. I had to restart Apache. I think it is this that has affected a few blogs. Blogs that use Domain Mapping are generally working. One of them (at least) doesn't create the correct link under Site Admin and Log Out. For Site Admin the link has become:

    http://xxxxxx.blogs.bob.ac.uk/xxxxxx.blogs.bob.ac.ukwp-admin/

    I set the Domain Mapping back to the original site name and it works again. I then moved it back to its Domain Map and the links are broken again. Because other blogs are working I think the blog was broken when I interrupted the Network Update.

    Any ideas?

    Thanks.

  2. You can try going to /wp-admin/network/upgrade.php and running the network upgrade again... That's a really odd error.

    How many sites are on your network?

  3. c3iq
    Member
    Posted 1 year ago #

    I have around 500 blogs.

    It is a domain mapping issue. I was comparing 'broken blogs' using domain mapping with 'working sites' using renamed blogs.

    It might not be because of the Network Update after all.

    I've tried updating the .htaccess file with the sites recommended code :

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    but that hasn't helped.

  4. Did you upgrade the Domain Mapping plugin? It had a semi-recent release.

  5. c3iq
    Member
    Posted 1 year ago #

    That would have been pulled in, yes.

    wp_loginout() runs properly with the correct URL not domain mapped. I tracing the domain map code at the moment.

  6. Whcih options did you check on /wp-admin/network/settings.php?page=dm_admin_page

  7. c3iq
    Member
    Posted 1 year ago #

    I get:

    You do not have sufficient permissions to access this page.

    for that URL.

    The domain mapping I'm using would be pulled in with WPMU.

  8. c3iq
    Member
    Posted 1 year ago #

    Chasing my tail. I think the page is generated and passed through a (template) filter. It might be related to:

    wp-content/plugins/wordpress-https/admin/templates/metabox/domain_mapping.php

    or

    wp-content/mu-plugins/domain_mapping.php

    I don't know how to debug it. I get the same result for https and http views of the blogs page.

    Any ideas?

  9. c3iq
    Member
    Posted 1 year ago #

    Another day another...

    wp-content/mu-plugins/domain_mapping.php

    From domain_mapping_siteurl() if I comment out:

    } elseif ( $return_url[ $wpdb->blogid ] !== FALSE) {
    //              $setting = $return_url[ $wpdb->blogid ];
     }

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    the URLs get created, so that they work, but not domain mapped.

    The function looks like its being called far too often.

  10. c3iq
    Member
    Posted 1 year ago #

    wp_register() eventually spits out:

    <li><a href="https://subdomain.domain.ac.uk/wp-admin/">Site Admin</a></li>

    which is correct so the HTML must be being post processed because the code uses 'echo'.

    How do I debug this please?

  11. c3iq
    Member
    Posted 1 year ago #

    Here is the stack for the code called when the correct URL is created:

    #0  wp_register() called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/default-widgets.php:314]
    #1  WP_Widget_Meta->widget(Array ([name] => Primary Sidebar,[id] => sidebar-1,[description] => ,[class] => ,[before_widget] => <li class="block"><div class="block-content block-widget_meta clear-block" id="instance-meta-2">,[after_widget] => </div></li>,[before_title] => <div class="title"><h3>,[after_title] => </h3><div class="bl"></div><div class="br"></div></div>,[widget_id] => meta-2,[widget_name] => Meta), Array ([title] => ,[dw_include] => 0,[dw_logout] => 0,[dw_login] => 0)) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/widgets.php:182]
    #2  WP_Widget->display_callback(Array ([name] => Primary Sidebar,[id] => sidebar-1,[description] => ,[class] => ,[before_widget] => <li class="block"><div class="block-content block-widget_meta clear-block" id="instance-meta-2">,[after_widget] => </div></li>,[before_title] => <div class="title"><h3>,[after_title] => </h3><div class="bl"></div><div class="br"></div></div>,[widget_id] => meta-2,[widget_name] => Meta), Array ([number] => 2))
    #3  call_user_func_array(Array ([0] => WP_Widget_Meta Object ([id_base] => meta,[name] => Meta,[widget_options] => Array ([classname] => widget_meta,[description] => Log in/out, admin, feed and WordPress links),[control_options] => Array ([id_base] => meta),[number] => 2,[id] => meta-2,[updated] => ,[option_name] => widget_meta),[1] => display_callback), Array ([0] => Array ([name] => Primary Sidebar,[id] => sidebar-1,[description] => ,[class] => ,[before_widget] => <li class="block"><div class="block-content block-widget_meta clear-block" id="instance-meta-2">,[after_widget] => </div></li>,[before_title] => <div class="title"><h3>,[after_title] => </h3><div class="bl"></div><div class="br"></div></div>,[widget_id] => meta-2,[widget_name] => Meta),[1] => Array ([number] => 2))) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/widgets.php:893]
    #4  dynamic_sidebar(sidebar-1) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-content/themes/mystique/sidebar.php:8]
    #5  require_once(/usr1/home/www/virtual/ourtest/public/htdocs/wp-content/themes/mystique/sidebar.php) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/template.php:407]
    #6  load_template(/usr1/home/www/virtual/ourtest/public/htdocs/wp-content/themes/mystique/sidebar.php, 1) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/template.php:383]
    #7  locate_template(Array ([0] => sidebar.php), 1) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/general-template.php:92]
    #8  get_sidebar() called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-content/themes/mystique/home.php:35]
    #9  include(/usr1/home/www/virtual/ourtest/public/htdocs/wp-content/themes/mystique/home.php) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/template-loader.php:47]
    #10 require_once(/usr1/home/www/virtual/ourtest/public/htdocs/wp-includes/template-loader.php) called at [/usr1/home/www/virtual/ourtest/public/htdocs/wp-blog-header.php:16]
    #11 require(/usr1/home/www/virtual/ourtest/public/htdocs/wp-blog-header.php) called at [/usr1/home/www/virtual/ourtest/public/htdocs/index.php:17]

    The code produced (copied to the error_log):

    <li><a href="https://sherazhussain.ourtest.dmu.ac.uk/wp-admin/">Site Admin</a></li>

    but the code in the browser reads:

    <li><a href="sherazhussain.ourtest.dmu.ac.ukwp-admin/">Site Admin</a></li>

    When I hover over this I get:

    http://sherazhussain.ourtest.dmu.ac.uk/sherazhussain.ourtest.dmu.ac.ukwp-admin/

    I get the same symptom if I change themes. domain_mapping.php appears to be doing its job.

    Any ideas folks? Much appreciated.

  12. c3iq
    Member
    Posted 1 year ago #

    I discovered, via the usual route of install backup and update one plugin at a time, that wordpress-https 3.3.6 caused the problem. I've downgraded to 3.3.5.

    Problem now is that I have to somehow go to the settings for HTTPS and re-save them for every blog.

    Anyone know of a quicker way?

  13. I do not, but I'm tagging this wordpress-https so hopefully that dev will see it and come looking.

    You may want to post this here: http://wordpress.org/support/plugin/wordpress-https

Topic Closed

This topic has been closed to new replies.

About this Topic