New issue
Advanced search Search tips

Issue 876505 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 62400
issue 867135



Sign in to add a comment

PDF XFA: Cannot read property 'isNull' of undefined

Project Member Reported by hnakashima@chromium.org, Aug 21

Issue description

To repro, on an XFA-enabled build:

1. Open the attached imm5257e_debug_oneofchild.qpdf.
2. Press the Validate button.
Expected: No JS error messages. Validation fails because the document is not filled. Empty or invalid fields are highlighted.
Actual: Some empty or invalid fields are highlighted. In debug, a message saying
"JS Error: TypeError: Cannot read property 'isNull' of undefined
Line 770: 	if (oField.isNull) {
"


 
imm5257e_debug_oneofchild.qpdf
2.1 MB Download
This is a namespace issue. The relevant parts:

<script contentType="application/x-javascript" name="validateForm">
function validateCompletedForm() {
  [...]
  validateEmail();
  [...]
}

function validateEmail() {
  // Let's call this "validateEmail_1"
  [...]
}
</script>

<script contentType="application/x-javascript" name="val">
function validateEmail(oField) {
  // Let's call this "validateEmail_2"
  [...]
}
</script>


The call to validateEmail inside validateCompletedForm should be going to validateEmail_1, but it is going to validateEmail_2. validateEmail_2 should only be referenceable as "val.validateEmail".
Blocking: 62400
Owner: tsepez@chromium.org
Passing this to Tom, I don't think I have enough time in PDFium to solve this. It is the last issue to make imm5257's Validate button work.

Sign in to add a comment