Forum

You must be logged in to post Login Register

Search Forums:


 






Patch worked, and then 5 minutes after upgrade, all drop-downs gone…

RESOLVED
UserPost

2:06 pm
20 September, 2009


Mark Barnes

Admin

posts 321

OK, I know now that I'm looking for a bug in the code that resets everything back to default or to what it previously was. Stay tuned…

2:26 pm
20 September, 2009


Mark Barnes

Admin

posts 321

If either of you are happy for me to look at your MySQL data and can send me log-on details for PHPMyAdmin, that might help.

Alternatively, go to http://www.domain.com/wp-admin…..ptions.php (obviously you'll need to substitute your own domain). Then tell me every option you have listed that begins either with sermonbrowser_ or sb_, then PM me with the contents of sermonbrowser_options (which will be a very long string of hexadecimal characters).

Hopefully I can get to the bottom of it that way.

Thanks,

Mark

3:09 pm
20 September, 2009


sapridyne

Enthusiast

posts 19

8:15 pm
20 September, 2009


webservant

Parkville, MD

Guru

posts 146

Just noticed that most (but not all) of my dates have shifted, too. When I click on the play button, I do get a file but the dates for those files is now incorrect for about 50% of them. There may be a pattern (not all dates are affected) but I have not determined what it may be. I have corrected just enough where the ones on the front page are correct but have left the remainder alone.

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org

8:54 pm
20 September, 2009


sapridyne

Enthusiast

posts 19

Post edited 7:55 pm – 20 September, 2009 by sapridyne


Ok, things have reverted back. Not sure how long it took, but it was less than five hours.

Here is what my settings were pre-revert:
http://tinyurl.com/nbdgkc

Here is what my settings show now, post-revert:
http://tinyurl.com/mc237h

And the beautiful sermon page on the revert:
http://tinyurl.com/nngwgh

I also noticed that the credit link is now back on the template that I took it out of this morning as well.

So the long and short of it is it looks like something is making the database revert back to defaults, but messing things up in the process. This is REALLY weird.

8:56 pm
20 September, 2009


sapridyne

Enthusiast

posts 19

Post edited 7:56 pm – 20 September, 2009 by sapridyne


Let me know what you need the next steps to be. I can send you logs or whatever you need.

9:04 pm
20 September, 2009


Mark Barnes

Admin

posts 321

Just noticed that most (but not all) of my dates have shifted, too. When I click on the play button, I do get a file but the dates for those files is now incorrect for about 50% of them.

OK, thanks, that's very helpful as there's only one bit of code that could cause that. I'll look into it right away before it gets worse. Sorry about all this.

10:03 pm
20 September, 2009


Mark Barnes

Admin

posts 321

OK, here's what's happening. The problem is I don't know why.

For some reason the options for SermonBrowser are getting corrupted. When that occurs, SermonBrowser assumes you're activating the plugin for the first time, and runs the installation procedures. That (1) resets your template and options back to default, and (2) runs the upgrade procedure which could change the times of your sermons.

What I need to determine now is WHY and WHEN the corruption is occurring. I'm running SB on several production sites, and can't reproduce it. If you have any idea, I'd be glad to hear it.

(It's possible the culprit is a PHP bug with unseralize, so it would help if you could let me know your PHP versions).

In the meantime, I'm working on adding some more error checking to the sb_update_option and sb_get_option functions, so at least we might find out the cause, and possibly work around it.

10:18 pm
20 September, 2009


sapridyne

Enthusiast

posts 19

I'm running PHP 4.4.9

11:25 pm
20 September, 2009


webservant

Parkville, MD

Guru

posts 146

My version says "4.x"

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org

1:19 am
21 September, 2009


Mark Barnes

Admin

posts 321

I've checked and re-checked the code and can't find anything that should make this happen. So I've slightly modified sermon.php for you both to try. This version disables the upgrade feature which is what is wiping your templates and changing your sermon times.

It will also die if there is a problem with retrieving the SermonBrowser options. Hopefully this will mean we can find out what caused the error in the first place (in theory, the problem should occur very soon after what caused the error).

You can download the new file here: http://pastebin.com/m47d4d12c

You'll need to rename it sermon.php and upload it instead of the existing sermon.php file.

Please keep me updated with what happens. My current theory is a possible bug with PHP4, but I'm not certain.

1:29 am
21 September, 2009


webservant

Parkville, MD

Guru

posts 146

Post edited 12:59 am – 21 September, 2009 by webservant


Mark Barnes said:

I've checked and re-checked the code and can't find anything that should make this happen. So I've slightly modified sermon.php for you both to try. This version disables the upgrade feature which is what is wiping your templates and changing your sermon times.

It will also die if there is a problem with retrieving the SermonBrowser options. Hopefully this will mean we can find out what caused the error in the first place (in theory, the problem should occur very soon after what caused the error).

You can download the new file here: http://pastebin.com/m47d4d12c

You'll need to rename it sermon.php and upload it instead of the existing sermon.php file.

Please keep me updated with what happens. My current theory is a possible bug with PHP4, but I'm not certain.

No shot at some systematic way of restoring the dates?

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org

3:06 am
21 September, 2009


Mark Barnes

Admin

posts 321

webservant,

As you have more than 700 sermons, I'll do my best for you, as I know a manual fix will be very painful. Do a database backup first, in case things go wrong though.

Then use this version of sermon.php: http://pastebin.com/m5e92067b

Then access this webpage http://www.yourdomain.com?sb-date-fix

It will look as though nothing has happened, but your dates will change. If you have PHPMyAdmin you should see the change. It's possible you might have to access the sb-date-fix page more than once.

If that doesn't work, restore your backup and if you can PM me details of your PHPMyAdmin password, I'll go in and fix it for you. If you can't give me those details, let me know and I'll try something else. The hard part is second-guessing exactly what changed. It will be possible, but it might take a few goes.

3:34 am
21 September, 2009


webservant

Parkville, MD

Guru

posts 146

I'm gonna try the automatic fix. If need be I will change it all manually. By the way, I have 700 up there now – but I'm not done. I will have nearly 1,300 in a month or so.

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org

3:34 am
21 September, 2009


sapridyne

Enthusiast

posts 19

I was thinking the same thing about PHP4… I'm on Dreamhost, and it's easy to upgrade to PHP5, but I'm hesitant in doing that for this (relatively) small issue. I'd hate to break other things on my system that might PHP5 issues/incompatibilities and I wouldn't be able to downgrade from PHP5 to 4. Hope that makes sense.

So I've replaced my sermon.php file with the first file you posted, reset the system config and things are working. I'm going to watch the Giants/Cowboys game, go to bed, and hope for the best in the morning.

Thanks again for your help.

3:39 am
21 September, 2009


Mark Barnes

Admin

posts 321

sapridyne, I want the plugin to work with PHP4, so we'll work it out somehow…

4:38 am
21 September, 2009


sapridyne

Enthusiast

posts 19

Post edited 3:39 am – 21 September, 2009 by sapridyne


Well, I actually looked at the other software that was running and decided it was safe to upgrade my PHP… so now I'm running 5.2.9. After I went ahead and restored my database from a few days ago (before the latest upgrade), deactivated the plug-in, updated, reactived… and still had the problem. So it looks like it's not a PHP4 issue…

Next, I did another restore from a DB backup, deactivated, replaced the sermon.php with the one you posted, reactivated, and now I'm waiting to see what happens…

10:45 am
21 September, 2009


Mark Barnes

Admin

posts 321

Thanks for the update… Let me know what happens. I'm keen to know what triggers the problem.

10:11 am
21 September, 2009


sapridyne

Enthusiast

posts 19

The new sermon.php seems to be working. Woke this morning with the page as I left it last night with everything working properly.

Let me know what the next steps should be. I'll try not to sneeze or blow on this page, in fear it might blow over :)

10:37 am
21 September, 2009


webservant

Parkville, MD

Guru

posts 146

My page is still intact as well.

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org


About the 4:14 evangelical christian theology blog forum

Most Users Ever Online:

19


Forum Stats:

Groups: 1

Forums: 6

Topics: 544

Posts: 2106




Popularity: 37% [?]