This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/
18 June, 2009
In the course of some testing, I ran into a problem. I had just installed WordPress and Sermon Browser on a test site. I created my Sermons page containing the "sermons" shortcode, but Sermon Browser was not finding it. I was still getting the warning about creating the Sermons page, and the Private podcast feed listed under Sermons, Options, was not showing the correct path to the Sermons page.
Here is what I figured out: The query string to look for the page containing the "sermons" shortcode checks to see that any page it finds is published in the past, and not scheduled for future publication. The idea, I guess, is that if a page is set to publish in the future, we shouldn't use it, because the page is not public. However, we do allow "private" posts in the query string, probably so that an admin can work on the Sermons page and test out Sermon Browser without making it public until it is ready.
When the query string checks that the page is in the past, it uses the post_date from the page and compares it with the current time using the NOW() SQL function. The problem is that the post_date is based on the timezone that the user has selected in the WordPress General settings (defaults to GMT). The NOW() SQL function uses whatever timezone the SQL server happens to be set to. In the case of my test site, the SQL server was set to Pacific (California) time. So the query thought that the new Sermon page I created was scheduled to publish in 7 or 8 hours, even though it was already visible on the site.
This might be the reason that we've seen users on the forum complain that Sermon Browser isn't working, and then it magically starts working later.
Anyway, long story short, here is the change. I don't really see a need to check the publish time on the Sermon page, so I'm removing the check. I will try to get this into a future version of Sermon Browser, but if you are reading this, you probably don't need to patch your own site; it only affects you if you are creating your Sermons page for the first time.
sermon.php, function sb_get_page_id:
Let me know if you have any questions or comments about this change.
Most Users Ever Online: 381
Currently Browsing this Page:
Rich Brown: 358
Matt Schlueter: 93
Don Johnson: 65
Guest Posters: 7
Newest Members:marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb
Moderators: Ben Miller: 1628
Administrators: Mark Barnes: 435