WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page template oddities (9 posts)

  1. davidjg
    Member
    Posted 8 years ago #

    Hi,

    I am using WordPress more as a CMS than as a blogging platform - therefore using pages more. I set up my page templates for each area of the site, and initially set up some tester pages. Page templates differ only in the content of the side bar.

    All was working fine until today. I edited a page's content via the WP interface, adding in an image (I was doing some CSS testing at the time). Now, that page has seemed to regress to an older page template (that's no longer on my server).

    Pages that haven't been edited since they were created, but used the same template, are still displaying fine. All other pages are displaying fine - I edited a page with another template, and there were no problems.

    This is not a CSS issue. I compared the source of a broken and a normal page, and there were clear differences that I did not make. I know it probably sounds weird, but the broken page seems to have regressed to an old template (of the same name, but since deleted before the new one was uploaded).

    I'm hoping you can help, as I'm pretty sure it's a WP issue, and not "my fault" as such. Running 1.5.2, no plugins, no custom loops on the page.

    EDIT: Oh, I should add that new pages created since the problem with the problem template also suffer from the same issues.

  2. vkaryl
    Member
    Posted 8 years ago #

    Have you contacted your host to see if they restored a backup of your site for some reason?

  3. davidjg
    Member
    Posted 8 years ago #

    No - and for the simple reason that I updated all the templates at the same time. Therefore, logic follows that if they'd done that, they'd all be broken. I initially assumed my host was having problems, as I've tried uploading the template again, but it makes no difference.

    Further investigation has shown that not only is it showing an old template, but an old header.php as well.

  4. vkaryl
    Member
    Posted 8 years ago #

    Would maybe depend on at what point they had a backup, and at what point they restored it. And it can't hurt to ask.... (BTW, this is the first time I've personally heard of anything like this in wp.... since February....)

  5. davidjg
    Member
    Posted 8 years ago #

    Well, I'll shoot them an email, but I don't imagine it's them, as pages that haven't been edited but use the same template are fine.

    It's almost as if:

    if page uses template_x.php and has been modified since creation, give old_template_x.php....

    It's such a specific issue, and I have no idea why, nor how to fix it. I searched the forums before for similar stuff - I don't suppose you remember some specific terms I could plug in and find the previous similar cases?

    Thanks

  6. vkaryl
    Member
    Posted 8 years ago #

    No, because I've not run across anything like this before in my (admittedly limited) tenure here....

    Thing is, without a backup somewhere (on your host?), there's no way for the pages in question to display something you deleted and/or replaced, see? Unless you've not cleared your browser cache any time in the last few months?

  7. S.K
    Member
    Posted 8 years ago #

    Just wondering if you have used an FTP client and had a look at the contents of your website.
    You can download the files and check in your editor for fidelity.

    HTH

  8. davidjg
    Member
    Posted 8 years ago #

    Browser cache is frequently cleaned, as are temp files etc.

    kichu - Good idea about downloading. However, I'm pretty sure it's not the page template (although I will check), because other pages using that template that have not been edited are unaffected. Also, initially I suspected the server, but again, only edited pages, and also the changes to the template were made a little while back.

    I think I've narrowed it down to something that's happened to the WP files themselves. I created a subdomain, and did a fresh WP install. Dropped the default tables, uploaded a backup of my SQL data. Uploaded the theme files. All was hunky-dory. Of course, in the test install, the pages had to be published for the first time, even though they showed up in the interface, and I did immediately edit one, but who knows, it might be a time thing...?

  9. davidjg
    Member
    Posted 8 years ago #

    Solution!

    Here's what I did. I deleted all my files except my wp-content folder and my wp-config.php file, then downloaded a fresh version of WordPress. I then re-uploaded all the files.

    The problem persisted. Therefore, it was in my wp-content folder.

    I had a look through there. As I mentioned earlier, the templates are all the same except the sidebar, and I'd uploaded all my templates again.

    The problem was that in this upload, I also uploaded an "Illustration" template, basically showing how the templates were put together. Originally, this code was based on the template which I was having problems with - it was basically an old version - and therefore had the same template name.

    WordPress wasn't showing two templates of the same name though - just one - the old, Illustration one. So when I went to edit the page, and reselected what I thought was the correct template, I was in fact choosing the old template which, although it has a completely different filename, had the same template info.

    Moral of the story: be careful what you upload!!

    Thanks for all your suggestions and help, and hopefully this proves useful for someone in future!

Topic Closed

This topic has been closed to new replies.

About this Topic