FB: Cut & Paste client side errors related to 'fb-static-upload-empty' control ID #2935

Closed
ajw625 opened this Issue Sep 20, 2016 · 5 comments

Projects

None yet

3 participants

@ajw625
Contributor
ajw625 commented Sep 20, 2016 edited

Orbeon 2016.2 is giving me intermittent errors when using Cut & Paste with some of my existing forms. I have tested this by copying the form source to the source of a new form on demo.orbeon.com and reproduced it. I've attached the source for my form definition: equipment_form_def.txt.

The error that Orbeon displays is not very useful. It seems to be failing to log the error. Note where the breakpoint has been set. That is the line where the error is occurring.

orbeon-cut-and-paste-error

When I used the debugger, the stack trace showed me where the error was actually occurring:

orbeon-cut-and-paste-error2

Steps to reproduce (bear in mind it's not consistent):

  1. Create a new form
  2. Edit the source
  3. Copy and paste the source of the equipment form
  4. Click on the Add Equipment heading control
  5. Click New Grid
  6. Click the right arrow three times so there are four columns
  7. Click the Type control
  8. Cut & Paste the control to the first column in the new grid

Sometimes this causes the error and sometimes it doesn't. Sometimes more cutting and pasting of controls causes the error. Sometimes deleting a control causes it. Sometimes it doesn't happen and I have to start the list of steps above all over again to reproduce it. Clicking on a control and then deleting different control can also cause the error.

This is a big blocker for the upgrade. I may have to roll back to 4.10. One of our form designers has tried repeatedly to complete edits to a form and keeps running into this. It's making Form Builder almost unusable. And I'm concerned that if Form Builder is not working correctly it could create errors in the form definitions.

@ebruchez ebruchez self-assigned this Sep 20, 2016
@ebruchez
Collaborator

One case I just obtained (a bit randomly) got handleControl(childNode) called with childNode being:

<xxf:control xmlns:xxf="http://orbeon.org/oxf/xml/xforms" id="fb-static-upload-empty" required="true" level="error" empty="true"/>

In this case, documentElement is null, which means that the element with id fb-static-upload-empty is not found, which probably means it was removed from the DOM.

I think this kind of things have happened in the past. Maybe @avernet can comment on this.

@ebruchez
Collaborator

And actually I see that this is what @ajw625 also got in the screenshot above. So that's good, it means that I reproduced the same issue.

@avernet
Collaborator
avernet commented Sep 21, 2016

Maybe this rings a bell because is sounds similar to #2685, which I fixed for 2016.1. I'll look into it.

@avernet avernet assigned avernet and unassigned ebruchez Sep 21, 2016
@ebruchez
Collaborator

Consistent steps with the form provided:

  1. Paste form
  2. New Grid
  3. Click near Type control in repeated grid to select cell (no need to activate the dropdown)
  4. Copy
  5. Click in newly-created grid's grid cell
  6. Paste
  7. Delete Type control
@avernet avernet closed this in 4eb099f Sep 27, 2016
@ebruchez ebruchez added this to the 2016.2.1 milestone Sep 27, 2016
@ebruchez
Collaborator

This is now fixed in 2016.2.1, which we just released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment