Closed (fixed)
Project:
Scripture Filter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2008 at 20:57 UTC
Updated:
14 Feb 2012 at 22:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
bbodenmiller commentedThat page has no links to scriptures.
Comment #2
mdlueck commentedI apologize, that page seemed to have been marked "Premium". I took that flag off for now. Later we can decide if that document is really Premium or not.
Please try the link again. Thank you!
Comment #3
bbodenmiller commentedHere is the patch code for the 6.x-1.0 version. It is probably the same for the 5 version.
Notice & changed to & in URLs:
switch ($translation) {
case 'ESV':
// note: the ESV could actually support a mouseover reference
// we could pull it directly from their site and include it in the $title text
// http://www.gnpcb.org/esv/share/services/api/ for more info
$link = 'http://www.gnpcb.org/esv/search/?go=Go&q=';
$title = 'English Standard Version Bible';
$link = sprintf('%s',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
break;
case 'NET':
$link = 'http://net.bible.org/passage.php?passage=';
$title = 'New English Translation';
$link = sprintf('%s',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
break;
case 'TNIV':
$link = 'http://www.tniv.info/bible/passagesearch.php?passage_request=';
$title = 'Today\'s New International Version';
$link = sprintf('%s',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
break;
default:
$link = "http://biblegateway.com/cgi-bin/bible?language=english&version=$translation&passage=";
$title = 'Bible Gateway';
$link = sprintf('%s',$link,htmlentities(urlencode(trim("$volume $book $verse"))),$title,trim($reference));
break;
}
Comment #4
mdlueck commentedbbodenmiller: Pasting in your code to the .inc file and commenting out the original portion - yuck! Shows up as bare text URL's. Testing on the 5.x-1.1 version.
Comment #5
jamesoakleyI've been able to reproduce this - the problem is that the anchor tags contain href attributes with '&' in, instead of '&'.
Flagged as 7.x, as all bug reports / new features are being developed against the 7.x version of the module for the time being (which does not stop those patches being rerolled against 6.x subsequently).
If someone wants to submit a proper patch file to fix this, they'd be very welcome!
Comment #6
jamesoakleyComment #7
jamesoakleyI think the attached solves it. If someone wants to test it, that would be a help.
Comment #8
mdlueck commentedLooks like a fairly simple diff. The one site we use this mod on is still on D6. Any idea if the diff is safe to apply to the D6 version?
Comment #9
jamesoakleyThe attached should work for Drupal 6.
If you could test this one and confirm it works for Drupal 6, that would be half the testing done.
Comment #10
mdlueck commentedVery odd... applying the patch makes no difference in the Validator gripe count!
URL
http://validator.w3.org/check?uri=http%3A%2F%2Fchristians-in-recovery.or...
Pre
262 Errors, 234 warning(s)
Post
262 Errors, 234 warning(s)
FYI: Did a bit of clean up on that page since these counts, so visiting the URL now will deliver different numbers. That does not change the fact that the patch does not appear to have fixed any gripes.
Comment #11
jamesoakleyThanks for testing.
Did you clear the Drupal cache before re-running the test?
Given there are quite a lot of errors / warnings on there that do not relate to Scripture Filter, we need to find out what errors are being caused by this module.
Could you try disabling the Scripture Filter module entirely, clear the Drupal cache, and run the test. Leave the result open, and open a new browser window / tab. Then re-enable the Module, clear the Drupal cache again, and use that new tab to re-run the test. You then have two windows with validation test results open side-by-side, the only difference being that Scripture Filter was being used for one and not for the other.
1. How many additional errors is this module causing?
2. Can you find those additional lines, and post exactly what the W3C validator is complaining about.
Once we know precisely what the reported problem is, we can work to fix it equally precisely.
Comment #12
mdlueck commentedActually I retested again, and now do not see complaints about Scripture Filter!
All caching is disabled, in Admin \ Site configuration \ Performance.
I have no idea what was up with the same error count before/after applying the patch.
Most errors were for an old script to randomly highlight site content. (P.S. I found how to properly wrap JavaScript within XHTML http://javascript.about.com/library/blxhtml.htm and even that block was able to be re-enabled without sending the grip count through the roof.) I turned that block off and the complaint list dropped to:
55 Errors, 20 warning(s)
and like I said, none that Scripture Filter caused. I guess your fix really did make a positive difference. Thank you! :-)
Comment #13
jamesoakleyCommitted
Comment #14
Watchkeeper commentedI can confirm that the patch has worked on our Drupal 6 installation. We now have a clean bill of health with the W3C code validator. Thank you very much!
Our site is bcconline.org.uk.