Dani3lSun / apex-plugin-dropzone

Oracle APEX Region Plugin - Dropzone
MIT License
72 stars 19 forks source link

"Uncaught ReferenceError: vArrayPageItems is not defined" #15

Closed jeffreykemp closed 7 years ago

jeffreykemp commented 7 years ago

Expected behavior

files uploaded without error

Actual behavior

after selecting or dropping a file into the dropzone, the file is not uploaded; console shows the following trace:

apexdropzone.min.js:2Uncaught ReferenceError: vArrayPageItems is not defined at Object.buildPageItemValuesArray (apexdropzone.min.js:2) at Object.uploadDzFiles (apexdropzone.min.js:3) at c.f.uploadFiles (apexdropzone.min.js:12) at c.processFiles (dropzone.min.js:formatted:882) at c.processFile (dropzone.min.js:formatted:870) at c.processQueue (dropzone.min.js:formatted:863) at dropzone.min.js:formatted:769 buildPageItemValuesArray @ apexdropzone.min.js:2 uploadDzFiles @ apexdropzone.min.js:3 f.uploadFiles @ apexdropzone.min.js:12 c.processFiles @ dropzone.min.js:formatted:882 c.processFile @ dropzone.min.js:formatted:870 c.processQueue @ dropzone.min.js:formatted:863 (anonymous) @ dropzone.min.js:formatted:769

Steps to reproduce the issue

Install Dropzone 1.9.5 Select, or drag-and-drop, a file into the dropzone

APEX version (4.2.6 / 5.0.3)

5.0.4

Used web server / version and platform (ORDS 3.0.3 / Tomcat 7 / Apache 2.4 / Linux x64)

Apache 2.4

Used web browser / version and platform (Chrome 48 Mac / Firefox 44 Windows)

Chrome 55 Windows

jeffreykemp commented 7 years ago

Need to fix apexdropzone.js:

// build array for page item values
buildPageItemValuesArray: function(pPageItemsArray) {
    var vArrayPageItemValues = [];
    for (var i = 0; i < pPageItemsArray.length; i++) {
        vArrayPageItemValues.push($v(vArrayPageItems[i]));
    }
    return vArrayPageItemValues;
},

vArrayPageItems should be pPageItemsArray here.

Dani3lSun commented 7 years ago

Hey @jeffreykemp sorry for that silly bug, fixed in DEV, hope to release a bugfix release today...