Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I know the blog's content is still on the server in the couch database, but since I moved /blog/index.php to the root as blog.php (in an attempt to make my "pretty url's" pretty) my blog is empty and I never backed up (I know I know...
how can I link the content in the db to my new blog.php?? along with all its relative comments, Like's and +1's...
---
You live many times, but only ever remember your lives.length - 1
---
Image
Your original template (as known to Couch and shown in the admin sidebar) was 'blog/index.php'.
Moving the php file to the root will not rename the original template. Instead it will result in the creation of a new template named 'blog.php'.

Data for the original 'blog/index.php' is still in the database but is not accessible because the physical file is missing.

You'll need to directly manipulate the database to set things right.
Before proceeding - BACKUP YOUR DATABASE NOW!. Please.

First, we'll need to delete the 'accidentally' added 'blog.php' template from Couch.
To do so, move the blog.php template back to blog folder and rename it back to index.php.
In the sidebar, click on 'blog.php'. The edit screen should show 'Template missing' because we moved it in the step above (you'll need to delete any cloned pages it has for this message to show). Click to delete the template.

Now we can proceed to rename 'blog/index.php' properly to 'blog.php'. Will require two steps -
a. Access your database (using phpMyAdmin or any other DB manager that you have) and browse the 'couch_templates' table.
Each of the template that your site consists of will have a record for itself in this table.
We'll be interested only in the 'name' column. Find the record displaying 'blog/index.php' in the 'name' column. Change the value of the name from 'blog/index.php' to 'blog.php'.

b. Now move the 'blog/index.php' file to the root and rename it 'blog.php'.

The admin-panel should now show all the original pages under 'blog.php'.

Hope this helps.
P.S. Please don't forget to backup your database before carrying out this procedure. You'll run the risk of losing your data permanently.
as soon as I realized the blog/index.php template was missing, I deleted it from couch admin (before posting on this forum)
could that have deleted the data from the database? coz your above method hasn't worked. all I have is default title etc... in the blog list view :(
---
You live many times, but only ever remember your lives.length - 1
---
Image
I deleted it from couch admin

Couch admin will not allow you to delete a template that has existing cloned pages.
You certainly must have also deleted the pages before deleting the template.

In any case, the bad news my friend is that your data is unfortunately deleted (you did it yourself) and is gone :(

Unless you happen to have a backup of your database, I'm afraid there is little we can do now to get it back.
You may be able to reconstruct some of the blog posts from Google cached pages. Try search for "cache:yourwebsite.com/blog/index.php".
KK yes I did delete the pages. my fault indeed.
cheesy proof from any browser? opera mini on my android tablet is giving me a page does not exist error. I'll try using chrome on PC later on
:(
---
You live many times, but only ever remember your lives.length - 1
---
Image
6 posts Page 1 of 1
cron