Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

AutoForm.find undefined after update to AutoForm 5.0 #32

Closed
dmeneses opened this issue Mar 16, 2015 · 16 comments
Closed

AutoForm.find undefined after update to AutoForm 5.0 #32

dmeneses opened this issue Mar 16, 2015 · 16 comments

Comments

@dmeneses
Copy link

I updated my project to AutoForm 5.0 and I'm using this package to upload files but i'm having this problem for the three field that are included in my form:

Exception from Tracker afterFlush function: undefined is not a function
TypeError: undefined is not a function
    at Template.cfsFileField_bootstrap3.rendered.Template.cfsFilesField_bootstrap3.rendered 

I debug the problem and I track it until this code in cfs-autoform.js

  Template["cfsFilesField_bootstrap3"].rendered = function () {
    var d = AutoForm.find(); <-------

I checked the version and it's the latest 2.1.1, is there a way to get this working or should i wait to update my package until this is fixed??

Thanks in advance...

@aldeed
Copy link
Owner

aldeed commented Mar 16, 2015

Have not yet updated this pkg for 5.0. Can probably remove that line and do var formId = AutoForm.getFormId().

@dmeneses
Copy link
Author

Is there an ETA for the update??

@psic4t
Copy link

psic4t commented Mar 20, 2015

I have the same problem. No Uploads anymore.

@careerlister
Copy link

+1 on an update to 5.0

@dpankros
Copy link
Collaborator

I still need to coordinate with @aldeed on the official release, but I've been working on an enhanced 5.0 version. It's not ready for prime time yet, but it could use some beta testing to work through uses cases, etc.. I'm sure there are use cases that I have not considered. If you're interested in testing it, the repo is here (Eventually, it should be pushed back into this repo.) Sorry, but I have not updated the docs, but they should be pretty close.

You can also check out the testing app for some more information and for use as an example. You'll have to test it as if you are developing a package because I don't want to publish it officially in atmosphere yet. This is really beta (or alpha) right now. In other words, expect quirky behavior at times.

As a teaser, the new version supports asynchronous uploads or "on submit" uploads, as well as thumbnails for images, dedicated thumbnail stores (in mongo). Individual files can be removed or added for collections of files (using cvs-files) too.

@careerlister
Copy link

Feedback: I've tested @dpankros package in our local, test and UAT environments and it performed well for each of our uses.

@theduke
Copy link

theduke commented Mar 26, 2015

@dpankros does your fork support uploading multiple files? ( issue #20)

@psic4t
Copy link

psic4t commented Mar 26, 2015

@dpankros Is it possible to implement a progress bar with your fork?

@dpankros
Copy link
Collaborator

@theduke It should. I have done this in the testing app and it works, but I have not compared with the current release of cfs-autoform to see if the behavior is different.

@dpankros
Copy link
Collaborator

@mdebus Yes, that should be possible. Currently, text will appear when uploading showing percent complete. When it completes, the text disappears. This should be able to be swapped out for a progress bar. To be honest, I looked at this for a few minutes and decided to focus on functionality over design right now. I won't be spending time on adding a progress bar until after it is officially released, however.

@dpankros
Copy link
Collaborator

@careerlister Great. Thanks for the feedback.

@stocksp
Copy link

stocksp commented Mar 27, 2015

@dpankros In your new package, Cancel of the file picker after it has already been used (input control has a file name) triggers a change event with no files. Easy to repro. Upload a file. Relaunch the file picker but cancel the dialog. A change event is raised and CfsAutoForm.singleHandler does not deal with it well (infinite loop trying to process a file that is not there). I put a simple guard in
if(files.length === 0)
return
and it seems fine. I couldn't get multiple files to work (type="cfs-files' didn't work) so I didn't test .multipleHandler, though I suspect it has the same problem.
Thanks for your work ... its really needed!

@dpankros
Copy link
Collaborator

@stocksp Interesting. The quick form version of an insert form doesn't have a cancel button and so I never tried it as I was using a quick form in my testing app. You must be using an autoform, right? I'll try to put in a fix in this weekend, if I have time.

On another note, it wasn't my intent to hijack this thread, though it seems that was the net-effect. (Sorry, @aldeed) For other comments about my fork, bugs, etc, please comment directly on my forked repo. I don't want to create more noise here than is necessary and I want to keep the discussion on track, if possible. If bugs need to be recreated after a merge (i.e. bugs submitted on my fork that may be applicable after a merge back to this repo), then I'll recreate them at that time (probably not with a full message history, however). Thanks!

@stocksp
Copy link

stocksp commented Mar 28, 2015

@dpankros I don't see an 'issues' button in your forked repro or I would have posted there. Yes, my template uses the autoform html found in the sample. When I say cancel button, I'm talking about the file picker dialog the browser puts up ... which always has I cancel button.

@dpankros
Copy link
Collaborator

@stocksp I didn't realize that was an option I had to turn on. You should be able to report issues directly now. Sorry about that. facepalm

@aldeed
Copy link
Owner

aldeed commented Mar 31, 2015

Original issue should be fixed in 2.1.2 release.

@aldeed aldeed closed this as completed Mar 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants