Header interface points to template URL, not new URL

After making a blog based on a template, I have found that the Wordpress header interface incorrectly tries to display a header image from the template's URL, and not the current blog's URL.

Steps to recreate:
- Copy a template
- Go into new blog dashboard > Appearance > Header, upload and select a custom header image
- During first few steps (crop & select), the correct image displays.
- On Submit, Header page displays a broken image, with the URL pointing to the original template blog (it's broken, because the image resides on the current blog and not the template).
- View of the blog front-end shows that it also is trying to display a header image with a URL from the original template blog.
- This problem does not appear if you are using the theme's default images - only if you try to upload your own image.

I can recreate this on both Wordpress 3.6 and 3.6.1. This error appears in New Blog Template versions 1.9, 1.9.1 and 2.


  • Alexander

    Hi @dmpress,

    I can confirm that it will link the image from the original site. This has been brought up before, and it's rather complicated to migrate all of a sites media. You would basically need to duplicate all of it in order it to keep the correct URL - In the end you'd have alot of duplicate images. Also, it would be very difficult and resource intensive to scan all of a sites posts and pages to replace URLs. Therefore, we've decided this won't be updated, and all templates will keep the media linked from the original site.

    That being said, I've tested this, and I'm actually not seeing the same result. I can even switch back and forth between header images, using the banner from the template or a newly uploaded one. I don't have any broken image links.

    Mind if I ask how your multisite is setup? Are you using subdirectories, or subdomains? Also, are you using any domain mapping?

    Best regards,

  • dmpress

    Hi Alexander,

    Thanks for the explanation, but this is really unacceptable. We run our Multisite setup for other users build blogs - and if they can't replace the header image in their own blog, this plugin is essentially useless to us.

    Is there a specific setting in the creation of the template blog that we could de-select to avoid this? (Even if it means we don't get an "exact" copy) If we only copy the posts and pages, and not the site settings, will we run into similar problems in other areas?

    I realize that the contents of posts and pages may have hard-coded links to media or images from the original blog -- that can be manually fixed. The header problem is a big one, because there is no way to fix it without us digging through the database (not an option).

    We are set up with subdomains. While we have a domain mapping plugin installed, it is not used on any of the sites that I tested in this case, and isn't widely used on our network.

    I should add that I was able to replicate this on both our test and production environments.

  • Alexander

    Hi @dmpress,

    Thanks for confirming about domain mapping / subdomains. Would you mind providing a link to a test site so I can see the 404 banner? I don't understand why it's not being reference properly.

    On the sites your testing, were they originally installed as 3.6? Or were they installed from 3.4 or earlier perhaps? As of Wordpress 3.5, some changes were made to how multisite file uploads work. If the original installation was prior to that, it would remain in that legacy file structure. This could be related.

    I know there isn't a specific setting for it at the moment. We've confirmed not being able to update posts/page content links. However, I'm unsure about the URL for the header image. After looking into this a bit further, if we can't track down a way to do this, I'll mention it to the plugin developer to see if he has any ideas.

    Best regards,

  • dmpress

    Hi @Alexander,

    Interesting update - further testing has shown that the biggest problem is if you try to select a header image from your existing Media Library. It can't seem to do it.

    Both of my multisite installs (test and production) were created a few years ago, back when the MU install was separate from the individual site install.

    This site was just created today, on WP 3.6.1 with New Blog Templates 2.0 :

    - Currently, there is no header image displaying. This happens when I try to select an image from the existing media library.
    - If you look at it in Firefox (I'm on 20.0.1), you don't see any image at all.
    - in Google Chrome (I'm on v29), there's a big broken image. If you right click and inspect the broken image, you will see that the source points to a different blog (sample.weblogs2.ijvt.ryerson.ca) - this is the URL template blog.

    Pretty weird.

    Thanks for looking into this!

  • Alexander

    Hi @dmpress,

    I see the broken image. I also noticed that the image can be found by changing the site URL to nbt.weblogs2..... instead of sample.weblogs2....

    I also noticed that you're using /files for your images. Could you let us know how this is setup for our reference? Perhaps just a simple mod_rewrite rule?

    As these were originally older installs, this might be playing a part. I'm not really sure how this can be resolved, so I'm going to need to touch with the developer for some feedback.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.