3

The feature did work in the past however pages now seem to default to 'Default Template'.

I can see my available page templates in the drop-down on the Page edit page, however after saving the admin simply shows 'Default Template' again.

I have tried disabling all plugins as well as remaking some of the templates, however the behaviour continues.

Any ideas?

Note: I'm using latest self-hosted WordPress.

Update: After some digging it would appear that I am getting 'Table xxx/wp_postmeta' is marked as crashed and should be repaired". However running repair through phpmyadmin does not fix the issue.

Update: Rebuilt the table entirely, still have issue.

(Originally posted this question here: https://webapps.stackexchange.com/questions/33627/wordpress-page-edit-does-not-save-selected-template)

  • Switch to the default WordPress theme and try adding a custom page template to that theme and test whether or not setting a template under page attributes saves correctly. If so, then its likely something in your functions.php causing the issue (if you say all plugins are disabled). – Adam Oct 24 '12 at 8:31
  • Still having the same issue with a default theme. – Ing Oct 24 '12 at 8:44
  • 1
    Full troubleshooting? – brasofilo Oct 24 '12 at 9:41
  • Looked through that now, checked a couple of things I had not before. Issue remains. – Ing Oct 24 '12 at 10:46
  • 1
    Had the same problem. If I edit the page through "Quick Edit", it saves correctly. – user51323 May 7 '14 at 2:29
6

I had the same issue and it was caused by WPML. I deactivated the option "Synchronize page template" in the WPML translation options and it finally worked.

3
+50

It sounds like your WordPress installation is coruppted. I'd try removing all of the files (except perhaps the wp-content/ folder and the wp-config.php and .htaccess files), and then uploading a fresh installation of WordPress.

Create a new MySQL database, if you can, and run the WordPress installer. After installation, you can try importing your blog content back using the Tools menu in the WordPress administration dashboard.

It's also a good idea to check for bad code. You've probably already tried reverting to the default theme (Twenty Ten, Twenty Eleven, Twenty Twelve), and disabling all plugins, but you also need to check if there's any files in the wp-content/mu-plugins directory, if it exists.

Good luck solving the problem.

  • 1
    +1 / Thank you for your input, good general troubleshooting tips... – Ing Oct 28 '12 at 17:26
0

Turns out this was an issue with my hosting.

phpmyadmin although reporting operations as complete was not actually committing repairs / optimisations. Now querying why this is with the company.

So the simple fix was indeed to simply repair + optimise the table.

0

I had the same problem and solved it.

I solved it by going to the table wp_postmeta (through phpMyAdmin) and just edit the record where:

post_id = {your post id or page id}
meta_key = _wp_page_template

I have changed the _wp_page_template's meta_value to default

Hope it works!

  • 1
    While your solution may work, there is not enough detail here to guide someone through it. Could you edit the answer so that someone with little experience could follow it? – s_ha_dum Jan 23 '13 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.