Skip to content
This repository

TypeError when trying to upload a file on the root of a site #24

Closed
hvelarde opened this Issue July 22, 2013 · 4 comments

3 participants

Héctor Velarde Juan Pablo Giménez Érico Andrei
Héctor Velarde
Owner

testing package on Plone 4.3.1 I get the following error when trying to upload a file:

TypeError: document.getElementById(...) is null @ http://localhost:8080/Test/portal_javascripts/Sunburst%20Theme/++resource++collective.upload/tmpl.min.js:1
Érico Andrei
Collaborator
ericof commented July 23, 2013

@hvelarde Do you have any other information about your error (Browser, OS)?

I've tried to upload files in Plone 4.3.1 (Chrome 28 and Firefox 23) and got no error messages.

Héctor Velarde
Owner

Plone 4.3.1, Ubuntu 12.04; I just recheck it and got the same issue in both, Firefox 23 and Chromium 28.

this is the traceback from Chromium:

Uncaught TypeError: Cannot read property 'innerHTML' of null tmpl.min.js:1
b.load tmpl.min.js:1
b tmpl.min.js:1
$.widget._initTemplates jquery.fileupload-ui.js:656
(anonymous function) jquery.ui.widget.js:99
$.widget._initSpecialOptions jquery.fileupload-ui.js:697
(anonymous function) jquery.ui.widget.js:99
$.widget._create jquery.fileupload.js:1033
(anonymous function) jquery.ui.widget.js:99
prototype.(anonymous function)._super jquery.ui.widget.js:86
$.widget._create jquery.fileupload-fp.js:215
(anonymous function) jquery.ui.widget.js:99
prototype.(anonymous function)._super jquery.ui.widget.js:86
$.widget._create jquery.fileupload-ui.js:702
(anonymous function) jquery.ui.widget.js:99
$.Widget._createWidget jquery.ui.widget.js:264
$.(anonymous function).(anonymous function) jquery.ui.widget.js:63
(anonymous function) jquery.ui.widget.js:208
e.extend.each ++resource++plone.app.jquery.js:2
e.fn.e.each ++resource++plone.app.jquery.js:2
$.fn.(anonymous function) jquery.ui.widget.js:203
config_upload_form main.js:102
$.prepOverlay.config.onLoad main.js:220
config.onLoad ++resource++plone.app.jquerytools.overlayhelpers.js:78
f.event.dispatch ++resource++plone.app.jquery.js:3
h.handle.i ++resource++plone.app.jquery.js:3
f.event.trigger ++resource++plone.app.jquery.js:3
(anonymous function) ++resource++plone.app.jquery.js:3
e.extend.each ++resource++plone.app.jquery.js:2
e.fn.e.each ++resource++plone.app.jquery.js:2
f.fn.extend.trigger ++resource++plone.app.jquery.js:3
(anonymous function) ++resource++plone.app.jquerytools.js:13
d.complete ++resource++plone.app.jquery.js:4
f.fx.step ++resource++plone.app.jquery.js:4
h ++resource++plone.app.jquery.js:4
f.extend.tick ++resource++plone.app.jquery.js:4

the error is shown just after selectin "Upload multiple files…" from the menu, before the modal window is open.

Héctor Velarde
Owner

this is only happening when adding files and images on the root of the site; as you can see here:

https://github.com/collective/collective.upload/blob/master/src/collective/upload/viewlets.py#L10

the viewlet is registered for OFS.interfaces.IFolder and this is clearly wrong.

@jpgimenez is going to fix it dirty and quickly just to make the release.

Juan Pablo Giménez jpgimenez referenced this issue from a commit July 24, 2013
Juan Pablo Giménez Fix issue #24 bb69ff3
Juan Pablo Giménez
Collaborator

@hvelarde fixed... not that dirty...

Héctor Velarde hvelarde closed this July 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.