File upload error

Permalink Browser Info Environment
We have a formidable form athttp://davidsongroup.net/homewise-app-partner-forms/monica-homewise... with file uploads. Unfortunately there is an upload error.

Steps to reproduce:
- click the Add Files button
- select a file

A javascript error is thrown from /packages/formidable/libraries/3rdparty/ajaxupload/js/ajaxupload.js:
Uncaught TypeError: Cannot read property 'files' of undefinedmethods.getFiles @ ajaxupload.js:1782$.fn.ajaxupload @ ajaxupload.js:1828ccmFormidableUploaderCheck @ formidable.js:278ccmFormidableUploaderError @ formidable.js:402fObj.ajaxupload.error @ formidable.js:243Class.extend.onError @ ajaxupload.js:750Class.extend.uploadAjax.xhr.onreadystatechange @ ajaxupload.js:625


We're at a loss as to why this might be happening. I'm told that at one point the uploads did work, but now they are not working anymore. Unfortunately I don't know what changes may have happened to cause this issue.

Can you take a quick look and see if it's anything obvious?

Type: Discussion
Status: In Progress
kirkroberts
View Replies:
kirkroberts replied on at Permalink Reply
kirkroberts
More detail:
the Photo (first field) is the one throwing the error.
The very next field — Company Logo — is also a file upload and does not throw an error. What's really strange is if you add a file to Company Logo and THEN add a file to Photo the file will upload to Photo!
So we're really confused and still hope you can shed some light on what might be going on.

Thanks!
kirkroberts replied on at Permalink Reply
kirkroberts
More testing:
- The first field is required while the second is not. Tried making the first field optional but it still throws the same error when trying to attach an image.
- Turns out it is the position of the field. If I switch the position of the fields the first field throws an error while the second does not.
- It doesn't matter if the file upload field is first in the form, just that it is the first file upload. Putting another field above the file upload does not cause the first file upload to start working... it still throws an error unless a file has been uploaded to another file upload field in the same form.
kirkroberts replied on at Permalink Reply
kirkroberts
The site owner reports that if there is just one file upload field it works, but if there are two fields we have the behavior defined in this thread.

*** I see this thread is marked as a Discussion rather than a Ticket. I hope that isn't affecting its visibility or priority. ***
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Just seeing this for the first time... Sorry about that...
Let me check this out...

Best,

Corretje
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Just seeing that your version is 2.0.11
You need to update the addon to make this work. In this version it isn't possible to have multiple upload instances. This is all resolved now, but that could be your problem.

Hope this helps....

Best,

Corretje
kirkroberts replied on at Permalink Reply
kirkroberts
Thanks for your reply, and sorry, I didn't realize there was an update. Should have checked that first!

Doing the update there was an error message:
mysqlt error: [1075: Incorrect table definition; there can be only one auto column and it must be defined as a key] in EXECUTE("ALTER TABLE FormidableSavedSearches MODIFY COLUMN searchID INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT")


Is that something that needs addressing or can we safely ignore it?
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

The error stops the upgrade, so you can't proceed....
You need to address this isseu first.

Do you have any knowledge of MySQL? If so, add a primary key to the table FormidableSavedSearches on searchID. Then re-run the update script.

Hope this helps.

I found the issue by the way, so fixed in the next update.

Best,

Corretje
kirkroberts replied on at Permalink Reply
kirkroberts
I guess we'll have to wait for the update, because Formidable is no longer listed on our updates page (which is what made me think the update had completed despite the error). Any time frame on the next update?
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Aha! Of course...
Can you check the database table "Packages". There downgrade the version of "formidable" pagacke and then there will be an update available again.

The next update will be there in a couple of days...

Best,

Corretje
kirkroberts replied on at Permalink Reply
kirkroberts
Thanks for the tips and all your responses.
In this case I'd rather wait a few days or so instead of directly affecting the database.

I appreciate your work and support!
DeWebmakers replied on at Permalink Reply
DeWebmakers
Just update the addon. Issue should be fixed

Best,

Corretje
kirkroberts replied on at Permalink Reply
kirkroberts
There was an odd hangup on the server while trying to update, probably not related to the update but maybe affecting it, so I tried the database mod you suggested of changing the current version number in the Packages table.

Then I tried the update again and got an error:
mysqlt error: [1068: Multiple primary key defined] in EXECUTE("ALTER TABLE FormidableSavedSearches ADD PRIMARY KEY (searchID)")
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Sh*t... sorry! Typo....just updated the addon again...

Best,

Corretje
kirkroberts replied on at Permalink Reply
kirkroberts
No worries, we all do that at some point. Thanks for fixing it quickly.

I still haven't been able to get a clean update because when I click the update button on Update Add-ons the site hangs without reloading the page. Can't even access the public site at that point. Tried downgrading the package version in phpmyadmin but then I can't access the Update Add-ons page. I assume this isn't because of your update, or you would have run into a similar issue. Thought I'd report it just in case.
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Strange, the addon shouldn't be the problem.
I'll check the update again to see if there is a issue on my development environment.

Best,

Corretje

concrete5 Environment Information

# concrete5 Version
5.6.3.1

# concrete5 Packages
Add Multiple Pages (2.1.1), Automatic Email Obfuscator (1.2.3), Best Suite - Core (1.2.6), Disqus Comments (0.5.1), Formidable (2.0.11), Oembed (1.2.0.1), Page List+ (5.6.0.0.0.5.4), RSS Feed Creator (1.24).

# concrete5 Overrides
blocks/blog_search, blocks/testimonials, blocks/calculators, blocks/page_list, blocks/content, blocks/home_carousel, blocks/autonav, blocks/form, blocks/oembed_content, blocks/main_search, blocks/page_list_plus, controllers/page_types, helpers/site.php, jobs/generate_sitemap.php, models/attribute, models/process_output.php, single_pages/page_not_found.php, themes/davidson

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.4.40

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 50M
sql.safe_mode - Off
upload_max_filesize - 50M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.