WordPress.org

Ready to get started?Download WordPress

Forums

Page template not saving (6 posts)

  1. James Mehorter
    Member
    Posted 4 years ago #

    Hi everyone,

    I've also posted this to WPMU, but thought someone here might of seen this before. I am seeing what looks like a bug. One of the blogs in my MU install uses several Page Templates. When I switch a page template from 'Default Template' to 'Homepage' for instance, then 'Update'. The page template field says 'Homepage' but the template is not actually applied, the 'Default Template' is still in use. If I go into phpMyAdmin, and go into wp_1_postmeta and locate the row specific to this post's id, the meta_key for '_wp_page_template' still has a value of 'index.php' instead of 'Homepage.php'. If I manually change this value all's well. Any idea why this happening? Thanks!!!

    James

  2. logicfire
    Member
    Posted 4 years ago #

    Hi James

    I have the same problem.. Your post helped me to fix my problem , so thanks a lot..

    i figured it out that my wp_postmeta table was corrupted though it was not saving page templates..

    Check wp_postmeta table.. this may be helpful for you..

    Thanks & Regards
    Logicfire
    Http://logicfire.in

  3. James Mehorter
    Member
    Posted 4 years ago #

    Hey Logicfire.. glad this helped you!

    I'm seeing a new problem now that when I edit the text for said page it is changing my Page Template randomly.. I just edited some text and updated.. The 'Page Template' in the editor says "Homepage" but if I go into phpMyAdmin the row for this id in wp_1_postmeta, the '_wp_page_template' key has a value of search.php. This file isn't even a Page Template?! So this page is now being outputted through search.php... how weird!

    Any ideas? Thanks!

    James

  4. James Mehorter
    Member
    Posted 4 years ago #

    If I make a text change to any page in my site the Page Template automatically changes to either index.php or search.php... Any ideas?

  5. logicfire
    Member
    Posted 4 years ago #

    Hi James

    yeah! really weird..never heard this kinda problem before..

    but i think your database is okey..

    1.) check your theme on other site or on local server..
    n see if it behaves the same or not..

    OR

    2.) The problem might be in wp files i think...
    So you can do one thing just delete old files and upload fresh new files.
    just keep the wp-content folder and wp-config file..

    Try it. may be helpful for you..

    Thanks

  6. BLichtenwalner
    Member
    Posted 3 years ago #

    Thank you, James, for sharing your details. After experiencing the same problem, I installed the WP-phpMyAdmin plugin, navigated to the postMeta table and found it corrupted. I then simply selected that table, clicked the Repair option and it successfully restored the table. I'm back in business now, thanks to the details you provided. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic