Page 2 of 3

Re: Version 3.1.0 PHP error

Posted: Tue Aug 04, 2020 8:53 am
by wiz
Hi Void, welcome to the community!

Did this happen after upgrading to 3.1.1 or whilst upgrading?
How far was the database cut off?

Is there any more details you could provide in regards to which version of WCMS you ever using?
Was this after upgrading to 3.1.1 or did you have a clean install? If you upgraded, how many days approximately passed before this happened?

Re: Version 3.1.0 PHP error

Posted: Sat Aug 08, 2020 12:30 am
by VoidConflict
wiz wrote: Tue Aug 04, 2020 8:53 am Hi Void, welcome to the community!

Did this happen after upgrading to 3.1.1 or whilst upgrading?
How far was the database cut off?

Is there any more details you could provide in regards to which version of WCMS you ever using?
Was this after upgrading to 3.1.1 or did you have a clean install? If you upgraded, how many days approximately passed before this happened?
It was not during the upgrade, I upgraded to 3.1.1 the day it released and the issue happened the day I posted to this forum. I started on the version before that with a clean install some time in July. My database file went from 27.3 KB to 16.1KB.

Re: Version 3.1.0 PHP error

Posted: Tue Aug 11, 2020 12:14 pm
by wiz
Thanks for the additional feedback, this is one of those things what will be absolutely prioritised, as we don't want users databases to be corrupting.
We believed we fixed this with version 3.1.1, but obviously this doesn't seem to be the case.

Thank you very much for your feedback, helps a lot!

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Thu Sep 10, 2020 9:14 pm
by jbwonderadmin
Should I expect this issue is resolved now and should not be expected to recur right now?

How can I collect e.g. logs to provide more info in case this somehow happens again?

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Mon Sep 14, 2020 9:51 am
by wiz
This issue has still happened on 2 ocassions and we are still actively trying to debug the bug.
Any PHP logs when this happens would be immensley helpful. How experienced are you with logging errors? (Not much experience on my end, tbh)

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Fri Oct 02, 2020 7:55 pm
by jbwonderadmin
I just observed that my database again blanked on 9/27. I restored it from a backup but this is getting frustrating.

I haven't found logs for this time period on my server so I am a bit confused.

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Fri Oct 02, 2020 8:01 pm
by jbwonderadmin
This seems to be a very difficult bug to work out. In the meantime, may I make the following suggestion:
-periodically backup just the database.js file to somewhere
-if the site hits the no database error and/or sees a database.js of 0 bytes, rather than returning the messy PHP string, have it restore database.js from the backup
This is obviously a dangerous kludge and not a long-term solution but it would make the software functional at a basic level, which has been an issue with this 3.x.x release due to this fatal error.

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Sun Oct 04, 2020 7:30 am
by wiz
Hi everyone.

Slaven has just created a pull request which I will review and test today and tomorrow.

Subsequently, I'll create a new release so this issue can be debugged and the fix can be upgraded if necessary.

The new fix will check if the database is corrupted or too small in size and not overwrite the database.

Additionally, it will create an error log in the data folder, which should give us insight (for those users that will share their logs) where the issue relies. JB, please share it since you seem to be able to reproduce the issue quite often.

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Thu Oct 08, 2020 2:24 pm
by wiz
3.1.2 has just been released. Please update to the latest version to prevent the database from being corrupt.
We have enabled the debugging - JB, please check your data folder often to see if there's an error log explaining why the database is being corrupted?

The log will tell us more, and the database will not be overwritten as Slaven implemented a fail safe to prevent it from being overwritten with 0 bytes.

Re: [BUG] Version 3.1.0 PHP error (corrupted database few days after update)

Posted: Fri Oct 16, 2020 11:13 pm
by wiz
Hey JB.

Would you mind checking your /data folder for any logs which might help up debug this?
This will only appear if you're on the latest version of WonderCMS (3.1.2) where we included this debugging.