Closed (fixed)
Project:
Bible Field
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2010 at 19:04 UTC
Updated:
8 Nov 2010 at 14:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
flickerfly commentedLooks like this is happening in the bible_field.js file where it decides how many to display. I imagine someone with some limited javascript understanding could pull this fix off rather quickly. I can't figure out how its getting its information so I'm having trouble being sure I can come up with a reasonable fix.
200 Chapters are given in the html and then the js weeds it out to the correct number. Here's a quick link if someone want to take a look:
http://drupalcode.org/viewvc/drupal/contributions/modules/bible_field/bi...
Comment #2
flickerfly commentedDigging more, it looks like the chapters are put into the HTML as a hidden input for the form. Here's an example.
So it is getting passed into the javascript properly. I'm going to guess that a javascript array starts at 0 and so it counts up to one less than we expect.
Could we change bible_field.js line 52 from:
to
Comment #3
flickerfly commentedThat didn't work, but adding a line immediately after to increment it by one did. Here's a simple patch that includes this change.
Comment #4
chrisshattuck commentedThanks for the patch, flickerfly. I did something similar to make the fix, just changing the < chapters to <= chapters. I also just noticed that there was a second place where that code is run for the Views filters, which is fixed in head and will be added in BETA3 ;).
Comment #5
chrisshattuck commentedMarking as fixed.
Comment #6
flickerfly commentedAh, excellent! I'll give it all a go as soon as I can. :-) I like your solution better.
Comment #7
flickerfly commentedworked