Forum

Thread tagged as: Question, Problem, Error

Blog Bug Report + Backup Request

Hello. I ran into a nasty bug with Perch Blog today. I created a new blog post, call it 'Blog #2'. I clicked 'create draft' to save it. I then went to the list of blog posts. Blog #2 was there, but had saved the contents of a pre-existing Blog #1, instead of the new information I'd just typed in. So it seemed that there were two duplicate posts, Blog #1 and Blog #2, both looking exactly the same. I therefore decided to delete Blog #2 and start again. However, after doing that, BOTH Blog #1 and Blog #2 had been deleted. That's a disaster - Blog #1 had taken a lot of time to create, and now it's gone.

So, that's the bug report. The request is: how can I restore the blog post? My understanding is that the data will be saved in the Perch database. And I have a backup on my server running, so I would hope I could restore the old database (i.e. the database before deleting Blog #1). Where is this database, in terms of file location on the server? (I am simply asking for the default location of the perch database, as I have not made any custom changes to this.) Thanks.

Mark Day

Mark Day 0 points

  • 2 years ago

Hello Mark,

Deleting a blog post in Perch, someone correct me if I'm wrong, will also delete it from the database. If you did not backup your database manually and have not installed the backup app, I'm afraid this blog post is gone forever.

Mike

Thanks for your reply Mike. As I mentioned, I am backing up all files on my server, i.e. everything in the perch folder on the server. Is the database to be found in that folder? If so, where? And if not, do you know where it is?!

Mark

The database does not have a location in your site's files. It's a MySQL database on the server. You should be able to access that using a tool like phpMyAdmin, contact your web host for details. However, I'm not sure how long a deleted post or a version thereof will be in the database.

Hi Mark,

As Clive stated; your database and your website's files are not in the same place. Ask your web host for the URL to reach your database. You can find your database username and password, which you set up during the perch setup, in your config file located on your server: ../perch/config/config.php.

As I mentioned: this database is only backed up manually or through the Perch backup app. Sadly, I could not find deleted blog posts in my own database.

Hi Mike and Clive, thank you for your help. I will go to my internet host to see if anything can be done from their end, to restore the database to a previous state.

Of course, this still leaves the initial bug that led to the problem. And I have to say that in general I have found the process of saving blogs to be very hit and miss - quite often it does not properly save. This hardly instils confidence in the software, and indeed if this continues then I will have to conclude that Perch is not a viable solution. (This would be a shame, as I have invested a lot of time integrating Perch into my wider website.) Has anyone else found these sorts of problems in saving blog posts?

Also, it would be good if Perch support chipped in on this. I do find it disappointing that there is no Perch support facility as such - no ticket system, let alone an email address or phone number. We have to post something here in the forum and hope that Perch support might notice it and respond. Another case in point - I posted a separate question in a different thread that is still awaiting an answer.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you able to reproduce the issue that resulted in one blog post being listed twice?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Looking at your previous requests (can't see an unanswered one, btw, so please flag it) it seems that you've had this issue before:

https://forum.grabaperch.com/forum/07-29-2018-questions-issues-with-perch-forms

As this is happening uniquely with you, it suggests there's something unusual about your server configuration. What can you tell us?

Hi Drew, thanks for replying. The unanswered post I referred to is at the end of the thread that you linked to in your last message. We corresponded for a while but in the end I asked how to fix the issue but heard nothing back from you on this. So the issues mentioned in that thread remain outstanding.

Is it possible that the issues are related? Could be - as I mentioned in that other thread, I seem to have three duplicate forms. And, similarly, I have three duplicate blog tabs. (I didn't raise this in the other thread since I thought it would be easier to focus on one issue at a time.) And now I am seeing weird behaviour in saving blog posts. Could they be related? I don't know, it would take someone far more knowledgeable than me in this area to say, but surely it's possible.

I'm very happy to send you diagnostics, screen shots, or anything else that you think might help here. But server-wise I would have thought everything was straightforward. I use a standard web hosting account with a mainstream provider, database set up in php myadmin ... I would have thought it was all very standard. But if you need specific info on any aspect of my server set up just let me know, and I will find out.

Thanks, Mark.

Hello again Drew - my apologies, I forgot that the old thread (that you linked to) was automatically closed, so I opened a new thread, and actually you DID reply to that, so my bad as they say, it turns out you were waiting on my answer rather than the other way round.

That new thread is: https://forum.grabaperch.com/forum/11-08-2018-3-issues-with-perch-forms

There I summarise the whole duplicate issue. To answer your question, it's certainly happening on production, since I am passed the development stage! And I guess it was happening back when I was in development, though to be honest couldn't be 100% certain that that was the case (it was a few months ago now).

It's probably best if we deal with these issues in one place, either this thread or the other one ... so why don't we do so here. Just let me know what info you need from me to help you get to the bottom of this.

Drew McLellan

Drew McLellan 2638 points
Perch Support

A good first step would be to download your production database to your dev environment and test if you're getting the same repeat items in that location.

Hi Drew, I have just done this. I moved the database and Perch files to a second domain (dev environment). On logging in to Perch, I'm getting the same repeat items. Again, my contactForm is repeated 3 times in Forms. And again, under Blog, I see three identical Blog tabs. I look forward to your next suggestion! Thanks, Mark

Further, I can confirm the initial bug remains. I just attempted to create a new blog post. I clicked 'Create Draft'. Although in the list of posts the new post has the new title I assigned to it, clicking in to that post shows that it has inherited all information from the previous post. Bad news. Therefore, as things stand, the blog functionality of Perch is completely unusable for us.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I moved the database and Perch files to a second domain (dev environment).

Is this on the same server? If so, that doesn't help at all. What we're trying to do is isolate if the issue with the server configuration, the software, or a combination of the two.

The software is the same for you, me, and everyone else, so it's unlikely that or we'd all see the problem. So that means the server configuration must factor in. That's what I'm asking you to test.

Hi Drew, thanks for your reply. First thing to say is that I am definitely no expert on server-side things. So even my notion of what does or does not constitute 'same server' is not crystal clear. But here is what I did. I downloaded the database via phpmyadmin, and perch files, from www.whiterosevisas.co.uk. I then logged in to a different domain, www.markday.co.uk, on the same hosting package (I use hostinguk.net), but a different account on that package. I uploaded the database via phpmyadmin and perch files, and tested. As these are different accounts, I thought they would be different servers. But maybe I am mistaken about that.

If you do need me to do something different, is there an instruction page somewhere on how to move Perch to a dev environment? That would be useful. Thanks. Mark.

Hello Drew, further to my previous message - here as an alternative way to approach the problem. I just looked in phpmyadmin and then at the perch database there. It seems to me that I can see in the database the reason for the problems. Specifically:

  • under perch_blogs there are 3 rows, all with blogID #1. Surely this is the reason for the 3 duplicate blogs?

  • under perch_blog_posts there are posts sharing the same ID. Surely the IDs should be unique. And one such sharing is between the new post I created and the penultimate one (the original bug referred to in this thread).

  • under perch_forms again there are 3 contactForms sharing same formID.

Perhaps this is an effect of the problem rather than its cause, but still, it seemed relevant to me and can perhaps help in solving the issue.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that sounds like a problem with the database. Perch doesn't generate the IDs - the database does. Are the rows set to use an auto increment ID? They should be.

Hi Drew, Madison, & anyone else interested. Since we realised it was a problem with the database, I got a friend of mine who knows his way around phpmyadmin/ SQL to take a look. He agreed that the problem was that the index keys on many of the tables were all messed up, were in many cases duplicated, and seemed not to be auto-incrementing. My friend seems to have fixed the problems by manipulating the database itself. Sorry, I can't say how exactly. And nor can I say why this happened in the first place. A real mystery. But at least my issues with duplicates (and resulting bugs) seem to have been solved. Thanks all.

I have the debug settings on but where should I be looking for the output after I submit a form? On the Forms app page? GBWhatsApp

Deleting a blog post in Perch, someone correct me if I'm wrong, will also delete it from the database. https://downloadluckypatcher.co

same problem I have on my website https://drehabdentalclinic.com/ kindly help me