[OPEN-ILS-DEV] BibTemplate and Opera Compatibility

Jeff Davis jdavis at sitka.bclibraries.ca
Wed Feb 16 14:16:04 EST 2011


We actually got an unprompted email from an Opera developer yesterday
about this issue.  Here's what he had to say, for your consideration:

***

After searching for a solution we figured out that it was due to the
used version of DOJO, which has a bug.

http://trac.dojotoolkit.org/ticket/10320

When Dojo 1.6 is released, you can fix that issue by upgrading the library.

http://trac.dojotoolkit.org/milestone/1.6

DOJO toolkit's detection of case-sensitivity (for XML documents) goes
incorrect in this case there by no nodes from an XML document (via XHR)
is returned and the cells therefore remain empty.

***

Hope that helps.
-- 
Jeff Davis
Sitka Implementation Team


Dan Wells wrote:
> Hello all,
> 
> I spent some time recently trying to get some typical rdetail
> BibTemplate code to work in Opera, and made a few discoveries worth
> sharing.  The attached patch (against the rel_2_0 file, but with no
> path) is not at all complete code, and in particular the 'if (1)'
> lines are just placeholders for possibly some other condition should
> we decide to pursue this.
> 
> From what I can tell, Opera gets tripped up by two independent
> aspects of BT.  First, it cannot properly respond to attributes in a
> dojo.query() call on JS XMLDocument objects (at least the ones EG
> delivers via unAPI).  That is, it will correctly do :
> 
> dojo.query("datafield", bib);
> 
> but fails on:
> 
> dojo.query("datafield[tag=245]", bib);
> 
> To get around this, we need to instead query the documentElement of
> the XMLDocument, not the XMLDocument itself.  Second, Opera does not
> work if the attribute is quoted within the query.  That is, it can
> correctly do :
> 
> dojo.query("datafield[tag=245]", bib);
> 
> but fails on:
> 
> dojo.query("datafield[tag='245']", bib);
> 
> or:
> 
> dojo.query('datafield[tag="245"]', bib);
> 
> The workaround here is to simply strip quotes from the query string
> before running it.
> 
> In limited testing, these changes did not have negative side effects
> for rdetail display in other current browsers.  I also have not
> deciphered whether Opera is simply be more strict than the other
> browsers, or whether these are genuine Opera bugs.
> 
> Please report back if you are able to test this patch.  Also, do you
> think these changes cross the line between 'compatibility fix' and
> 'compatibility hack', and if so, are they worth considering for a
> minor browser?
> 
> Thanks, Dan
> 


More information about the Open-ils-dev mailing list