Forum

You must be logged in to post Login Register

Search Forums:


 






Bug Busting version 0.42 – with SOLUTIONS

No Status Selected
UserPost

4:29 pm
10 April, 2009


cybersheep100

Enthusiast

posts 13

Hi Mark,

Thanks for the quick response with version 0.42 to incorporate some of the bug fixes I mentioned yesterday.


Here are a few I found this afternoon:

1. My version of MySQL (latest in strict mode) struggles with NULL and DEFAULT values and throws an error. This arises from the table creation routine of sb_series in semon.php line 216 to 224.

The problem is caused by declaring page_id as NOT NULL and then by not entering values in 220 and 222 for page_id – which MySQL defaults to NULL!


Three solutions presented themselves:

(a) remove NOT NULL from the declaration

(b) include values for page_id in the INSERT statements in lines 220, 222

(c) declare a DEFAULT 0 to page_id line 216


I opted for the latter so my new line 216 is:

`page_id` INT(10) NOT NULL DEFAULT 0,


BTW I'm not sure actually what page_id is for – on a cursory glance I couldn't see it being used in wp_sb_series (or for that matter in wp_sb_sermons where it also appears). Perhaps it is for some new whizzy upcoming feature!!


2. MySQL Error on sermon display page – no sermon_id after the Audioplayer plugin.


Solution:

It appears in the updated '[embed_loop]' in dictionary.php (line 53) the $media variable is incorrectly set. I changed it from

$media = sb_get_stuff($sermon);

to

$media = sb_get_stuff($sermon["Sermon"]);

This appears to work – I assume that is the correct index to the array for embeds?


Hope these help.

Thanks again for all your hard work on an outstanding plugin – it IS appreciated.


Every blessing.

2:31 pm
12 April, 2009


Mark Barnes

Admin

posts 321

Thanks for the bug fixes. I've included them in 0.42.1

The page_id is for a whizzy new feature – although they've been there since about version 0.30! But now shortcodes are (mostly) working, it's possible I might be able to finally use the field.

3:19 pm
13 April, 2009


cybersheep100

Enthusiast

posts 13

Mark,

Unfortunately the fix for issue 1 you put on 0.42.1 doesn't work!!

You put a '' for page_id in lines 220 and 222, but page_id is an INT not a string!

So, if this method is your preferred solution, you need to put a page_id of 0

e.g. Change:

$sql = "INSERT INTO " . $table_name . "(name, page_id) VALUES ( 'Exposition of the Psalms', '' );";

TO:

$sql = "INSERT INTO " . $table_name . "(name, page_id) VALUES ( 'Exposition of the Psalms', 0 );";


(like you used in line 2241)


Hope that helps!


10:56 am
17 April, 2009


Mark Barnes

Admin

posts 321

Oops! Fixed in 0.42.3. Thanks.


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% [?]