Can't add MFHD record using "Add MFHD Record" from XUL menu

Bug #670734 reported by Dan Scott
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Lebbeous Fogle-Weekley
2.0
Fix Released
Undecided
Lebbeous Fogle-Weekley

Bug Description

  * Evergreen trunk as of November 2
  * PostgreSQL 8.4
  * Fedora 13

When trying to add an MFHD record using the XUL menu (Actions for this Record -> MFHD Holdings -> Add MFHD Record), the "Select Org Unit" dialogue displays and gives the user the option to select an OU, then hit "Select" or "Cancel". Unfortunately, clicking "Select" doesn't do anything, so "Cancel" is the only option that the user can select.

JavaScript console shows:

Error: opener is null
Source File: http://localhost/xul/0trunk_/server/serial/select_aou.xul
Line: 57

Revision history for this message
Dan Scott (denials) wrote :

Aside: using the embedded Dojo "Add MFHD Record" button still successfully adds an MFHD record.

Revision history for this message
Dan Scott (denials) wrote :

Also reproduced on the Debian Squeeze alpha 5 virtual image.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Looks like a straightforward case of a missing constant.

Dan, with this commit, do you get the expected behavior?
http://svn.open-ils.org/trac/ILS/changeset/18622

Revision history for this message
Dan Scott (denials) wrote :

Actually, I still get "opener is null". I don't see where in select_aou.xul (or anywhere, actually) the opener variable is initialized.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Gah. When following your steps, I was consistently getting a different error, which is what I fixed:

  Create MFHD failed

  Method not found for MFHD_XML_RECORD_CREATE

Now that I'm paying better attention, I'll try to figure out what's up with opener. FWIW I haven't been able to duplicate that error message yet. Anything else special that might affect the bug? Holdings maintenance vs OPAC view, or anything like that?

Revision history for this message
Dan Scott (denials) wrote :

Thanks for trying!

I've been using "Retrieve record by ID", then entering the ID (2). The client opens to the OPAC view, and I use the "Actions for this record" menu from there to get into the MFHD Holdings -> Add MFHD Record menu item.

Revision history for this message
Dan Scott (denials) wrote :

Further debuggin info:

[dan@dbs ~]$ xulrunner --version
Mozilla XULRunner 1.9.2.12 - 20101027154941

Revision history for this message
Dan Wells (dbw2) wrote :

I think this problem might already be fixed in the integration branch, or in my local branch. Sorry for letting things drift, I must be mistaken about what has made it in so far. I would be glad to take over this bug if possible and work it out on Monday.

Revision history for this message
Dan Wells (dbw2) wrote :

This is verified fixed in my local alpha5-based branch. Sorry guys, I'll figure out what's missing from the released version.

Thanks,
Dan

Revision history for this message
Dan Wells (dbw2) wrote :

Spoke too soon, I should have said 'working for me' rather than 'verified fixed.' I tested with a version of xulrunner closer to Dan Scott's and was able to duplicate the bug. I am looking into it now.

Revision history for this message
Dan Wells (dbw2) wrote :

I have done some research, and my best guess is that my code was taking advantage of the bug mentioned here (since fixed):

http://www.mozilla.org/security/announce/2009/mfsa2009-70.html

There are many ways to accomplish this same task, so I am now changing this in the two places I used window.opener.

Revision history for this message
Dan Wells (dbw2) wrote :

The attached trunk patch dispenses with the direct window.opener access in favor of the modal_xulG structures, and should be applied in conjunction with the missing constant Lebbeous noted (already in trunk, http://svn.open-ils.org/trac/ILS/changeset/18622 ).

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Thanks Dan! Your patch seems to do the trick. Committed and backported to rel_2_0.

If either of your Dans need anything else on this, just let me know!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.