Forum

This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
Posting new sermons fails with WP 3.9
24 April, 2014
12:17 pm
Extrafino
Enthusiast
Members
Forum Posts: 43
Member Since:
5 July, 2013
sp_UserOfflineSmall Offline

After upgrading to WP 3.9 I cannot post new sermons.
Uploading a file via FTP and including it in a new sermon does not work, because the sermonbrowser does not seem to find the filename. I can see a new option in the selection box, but it has no text.
Alternatively I tried to upload to amazon S3 and include the url, which used to work before. Now, sermonbrowser seems unable to save that url.

In addition I can only post to this forum after deactivating tinyMCE. Chrome tells me the .js-files for MCE were not found on the sermonbrowser server.

[update] I can see so far, that the database entries for the sermon are being made. Saving the url of the used file fails, because in the table sb_stuff the field "name" remains empty. After pasting the url of the sermon by hand, it works.

[resolved]
To me, it appears that the function "mysql_real_escape_string" throws an error and returns an empty string, most likely because there is no open database connection at the time the function is used.
In the file /sb-includes/admin.php I replaced all occurences (should be 12) of "mysql_real_escape_string" with the wordpress-specific function "esc_sql" (http://codex.wordpress.org/Data_Validation#Database) after that uploading a file into the uploads-folder and publishing a sermon seem to work just as before.

2 May, 2014
12:14 am
Extrafino
Enthusiast
Members
Forum Posts: 43
Member Since:
5 July, 2013
sp_UserOfflineSmall Offline

I would be glad if anyone else having this problem can verify that my proposed fix is working.

19 August, 2014
9:33 pm
driftmgmt
New Member
Members
Forum Posts: 1
Member Since:
19 August, 2014
sp_UserOfflineSmall Offline

This seems to work for me. I ran into the same issue - the sad thing is... this plugin appears to be abandoned but so many churches are using it at this point. Stop supplying it for free, charge us $50... whatever. They just shouldn't abandon a plugin and make so many churches find another solution.

20 August, 2014
4:32 pm
Scott150
McCaysville, Georgia USA
Enthusiast
Members
Forum Posts: 20
Member Since:
8 January, 2014
sp_UserOfflineSmall Offline

I'm almost certain that my problem did not occur with the update to WP 3.9 as that was quite awhile ago and the problem I have, which appears to be the same as yours, did not start until last week. It actually began when I added an attachment to a sermon; Decided that it didn't look right and then deleted the attachment, a PDF file.

After much searching I found that, when adding a sermon, everything went into the SQL database OK with the exception of the "wp_sb_stuff" table. Sermon Browser failed to insert the "sermon_id" and "duration" fields into this table (Inasmuch as the sermon is just being added, the "count" field should be zero). I have no idea as to why SB fails to initialize these these fields as it does insert the file name properly so it is accessing the DB without an error.

I made the changes you suggested, i.e. replacing all 12 occurrences of "mysql_real_escape_string" with the WordPress-specific function "esc_sql" in the /sb-includes/admin.php file, but it did not correct the problem. While its a pain, manually inserting the correct data into the "sermon_id" and "duration" fields corrects the problem 100% of the time (so far). The "sermon_id" can be found in the "wp_sb_sermons" table as the "id" field. The duration can be determined using Widows Explorer.

Anyone have a suggestion as to why this problem has taken so long to manifest itself? Anyone have a solution?

10 September, 2014
7:46 am
Daniel Saunders
Enthusiast
Members
Forum Posts: 25
Member Since:
4 February, 2013
sp_UserOfflineSmall Offline

I think I've come across the same problem.

I've made a fresh install as a testing site - and adding sermons gives the same bunch of weird results as above. For me, replacing the mysql_real_escape_string with esc_sql seems to have solved the problem.

But the problem isn't consistent - I've had no problems on our live website?!

Strange.

10 September, 2014
8:43 am
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Daniel Saunders,

I haven't been able to replicate this problem.  You said you see the problem on your test site, but not on your live site.  What version of PHP are you running on each of those sites?

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

10 September, 2014
2:43 pm
Extrafino
Enthusiast
Members
Forum Posts: 43
Member Since:
5 July, 2013
sp_UserOfflineSmall Offline

For me, the problem startet on a live website running PHP 5.5.16
The function is deprecated from PHP 5.5 onwards, I don't know from what version on it is removed
(http://php.net/manual/de/funct.....string.php)

BTW, the errors posting to this forum seem not to have been removed. Any updates on that?

11 September, 2014
12:14 am
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Extrafino, thanks for the info.

The forum posting works well for me now.  What exactly are you seeing when you post to the forum that isn't working?

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

11 September, 2014
12:32 am
Extrafino
Enthusiast
Members
Forum Posts: 43
Member Since:
5 July, 2013
sp_UserOfflineSmall Offline

You are right, posting works again, even with TinyMCE.

Only thing missing are the images for the smilies below the editing area. I don't really need those, it just still looks broken

;)

11 September, 2014
5:52 am
Daniel Saunders
Enthusiast
Members
Forum Posts: 25
Member Since:
4 February, 2013
sp_UserOfflineSmall Offline

Hi Ben,

It's working fine on our live server, which I think is running PHP 5.2.17.

On my home Ubuntu machine (the testing version) I'm running PHP 5.5.9.

12 September, 2014
3:18 am
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

I bet it's a PHP 5.5 thing.  According to the PHP documentation, the function is supposed to be deprecated in 5.5 (which means it should still be working), but I've seen it before where something that was marked as deprecated simply didn't work anymore.

Unfortunately, running 5.5 isn't easy for me, since my webhosting plan doesn't offer it.  I'll have to try to install it locally and see if I can duplicate the problem.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

12 September, 2014
4:30 pm
Joshbaker90
Member
Members
Forum Posts: 7
Member Since:
12 September, 2014
sp_UserOfflineSmall Offline

I'm having exactly the same issues as described here. When uploading a file it was initially creating blank lines in the mysql tables. I deleted these lines out and now its not posting any lines at all? I found that the file is actually being uploading but nothing is posted in mysql.

I put wordpress in debug mode and found the following errors. 

Deprecated: mysql_real_escape_string(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Warning: mysql_real_escape_string(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Warning: mysql_real_escape_string(): A link to the server could not be established in /var/www/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Again i can add files successfully by manually adding into the mysql tables in phpmyadmin. currently trying to find a solution. 

13 September, 2014
9:44 pm
Rich Brown
Parkville, MD
Guru
Members
Forum Posts: 358
Member Since:
13 July, 2009
sp_UserOfflineSmall Offline

I am running WP 3.9.2 with php 5.3 with no errors whatsoever. My SermonBrowser version is 0.45.12

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

14 September, 2014
5:03 pm
Kays Little Korner
New Member
Members
Forum Posts: 2
Member Since:
6 September, 2014
sp_UserOfflineSmall Offline

driftmgmt said
This seems to work for me. I ran into the same issue - the sad thing is... this plugin appears to be abandoned but so many churches are using it at this point. Stop supplying it for free, charge us $50... whatever. They just shouldn't abandon a plugin and make so many churches find another solution.

Can y'all tell me why this plugin has been abandoned or why you think that? I am only asking because my husband just had me put this on his website, it was working fine, but updating WP to the new 4.0 and suddenly we are having problems with this plug in just not playing sermons. I would love any assistance as to how I can make them play or if the solution is to move to another sermon plugin.

15 September, 2014
1:07 pm
Joshbaker90
Member
Members
Forum Posts: 7
Member Since:
12 September, 2014
sp_UserOfflineSmall Offline

Im guessing this could be a permissions issue. So i found one reason possibly why this isn't working on my website but might be working on other peoples. My Sermon browser is trying to execute commands on mysql using the user name [email protected] instead of the standard wordpress user [email protected] or [email protected] etc

Now i dont think they have abandoned sermon browser. i heard an update no long ago that they are trying to create a new sermon browser clearly there time is being spent on this upgrade.

15 September, 2014
5:29 pm
Joshbaker90
Member
Members
Forum Posts: 7
Member Since:
12 September, 2014
sp_UserOfflineSmall Offline

Ok so i have been looking at this for a while today. Although i am getting a permission issue it is still posting to the mysql tables. Also when adding a sermon and deleting a sermon there seems to be no issues at all.

So i found that when uploading a file this creates an entry in my mysql table wp_stuff but doesn't pick up the filename. So the file in name in the table is blank. Now because sermon browser has a built in function to recognise files also uploaded via ftp, when the page finishes uploading the first time it refreshes the page. Now when the page refreshes it looks for any files in the uploads/sermons folder which isnt listed in the mysql table wp_stuff. Now because the first time it didn't record the file name it then creates another blank entry in the table. This continues to happen every time you refresh the page. or click on the files link in the admin panel.

So i'm guessing here the root of the problem is how sermon browser recognises file names. This could just simply be to do with the mp3 tags. or a permissing thing with recognising or reading the file name. I'm still working on it.

16 September, 2014
2:19 pm
Joshbaker90
Member
Members
Forum Posts: 7
Member Since:
12 September, 2014
sp_UserOfflineSmall Offline

 Ok so i have made a lot of progress with this so far. Basically since the upgrade to wordpress 3.9 the php function 'mysqli_real_escape_string()' does not work and causes a mysql connection error (not sure why?).

Anyway I basically did a find and replace on the admin.php file found in /sermon-browser/sb-includes. I replaced 'mysqli_real_escape_string' with '$wpdb->prepare'.

I also tried a find and replace like this 'mysqli_real_escape_string' with ' esc_sql' however this did not work.

Now the only function that i cant get to work is the delete function. Just trying to figure that one out...

17 September, 2014
4:05 pm
Extrafino
Enthusiast
Members
Forum Posts: 43
Member Since:
5 July, 2013
sp_UserOfflineSmall Offline

Joshbaker90 said
So i found that when uploading a file this creates an entry in my mysql table wp_stuff but doesn't pick up the filename.

I already posted the same problem including the solution. It does pick up the filename from the filesystem but the function mysqli_real_escape_string is used to sanitize the filename.
Since this function stops working in PHP > 5.5 versions it returns an empty value. This empty value is then saved and nothing is found if you try to use the sermon.

I used esc_sql because it is a function inside wordpress, so you don't have to worry about PHP-functions. But after consulting the WordPress-Codex you are probably right:

  • $wpdb->prepare() is generally preferred as it corrects some common formatting errors.

If you used exactly the search and replace you posted, you have an extra space there.... maybe it did not work because of that.

I have not yet updated my sites to WP 4.0 because I am unsure of incompatibilities.

19 September, 2014
12:36 pm
Joshbaker90
Member
Members
Forum Posts: 7
Member Since:
12 September, 2014
sp_UserOfflineSmall Offline

Well i have tested the find and replace. On WP 4.0 and 3.9 and have the same issues. The find a replace using $wpdb->prepare works great to uplaod files and attach to sermons. The only issues i'm getting now is the javascript errors. to either change the name of the file or delete. For some reason it keeps saying can't execute script. I have no idea why. Im guessing this could be a separate issue.

19 September, 2014
8:18 pm
Extrafino
Enthusiast
Members
Forum Posts: 43
Member Since:
5 July, 2013
sp_UserOfflineSmall Offline

I have now upgraded my installation to WP 4.0 keeping my fixed SermonBrowser Version and have no issues so far.

No permission to create posts
Forum Timezone: Europe/London

Most Users Ever Online: 381

Currently Online:
19 Guest(s)

Currently Browsing this Page:
2 Guest(s)

Top Posters:

Rich Brown: 358

Matt Schlueter: 93

Mindy: 72

Don Johnson: 65

anointed: 57

0be1: 55

Member Stats:

Guest Posters: 7

Members: 3188

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1713

Posts: 7499

Newest Members:

marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb

Moderators: Ben Miller: 1628

Administrators: Mark Barnes: 435