Test File upload on acquia
We need to make sure that the file upload is consistently working.
Make a form that has the file upload required.
See if once you upload the file that you are able to submit the form.
We may need to make sure that the location for the file uploads is working.
Comments:
- Seems to be related to similar issues with file upload of binary stream getting interrupted or cutoff. From Acquia (https://docs.acquia.com/cloud/develop/files/broken):
"For example, when you use a module (such as the Plupload module) to upload a large file, the file is divided into chunks that upload separately. On Acquia Cloud Enterprise, the user's requests could get switched from one web server to another during the upload. As a result, chunks of the uploaded file could arrive on different web servers, and the web servers would not be able to put them back together."
(Sean Quigley - Jan 5, 2017)
- Enabled logging on wgss.osu.edu using LOG_LOCAL0 as syslog facility. Added prepended string 'standarddrupal7_wgss' to Syslog identity to better identify errors thrown from pages on this specific site. (Sean Quigley - Jan 5, 2017)
- For testing: https://wgss.osu.edu/doc-upload-test (Sean Quigley - Jan 5, 2017)
- Have duplicated error using following process:
- Click 'Choose File"
- Choose a file
- Click 'Upload'
- Wait before submitting entire form (at least one minute) (Sean Quigley - Jan 5, 2017)
- Testing on dev.wgss.osu.edu: file uploads successful while authenticated using both 'choose file > upload > submit' and 'choose file > submit' methods. (Sean Quigley - Jan 5, 2017)
- https://dev.wgss.osu.edu/file-upload-test (Sean Quigley - Jan 5, 2017)
- file upload failure on dev.wgss.osu.edu while anonymous user and using 'choose file > upload > submit' method. (Sean Quigley - Jan 5, 2017)
- JS error thrown after 'choose file': TypeError: Cannot read property 'length' of undefined /modules/file/file.js?ojbuyg:72 (Sean Quigley - Jan 5, 2017)
- Got stuck on committing module to code.osu due to permissions changes (?), but have committed module code files to dev and have enabled on dev.wgss.osu.edu. (Sean Quigley - Jan 6, 2017)
- Notice: Use of undefined constant FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS - assumed 'FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS' in media_variable_default() (line 133 of /mnt/www/html/standarddrupal7dev/docroot/profiles/asc/modules/contrib/media/includes/media.variables.inc). (Sean Quigley - Jan 6, 2017)
- Plupload integration had no affect on problem in dev. Exploring whether AJAX callback function on webform submit is the issue. It may be similar to the webform results download issue and require a similar drush command to set the variable to use shared file upload dir (?). But I believe this has been done...
drush @[docroot].[environment] vset webform_temporary_uri '/mnt/gfs/[docroot].[environment]/tmp' (Sean Quigley - Jan 6, 2017)
-
Used validation tool at https://validator.w3.org to verify that we have similar problem reported on Drupal forums (duplicate element ids after AJAX callback). Applied patch locally and committed changes to dev. NEED TO TEST! Rebuilt registries and cleared all caches via Drush. (Sean Quigley - Jan 6, 2017)
-
https://www.drupal.org/node/2583361 (Sean Quigley - Jan 9, 2017)
-
Use this: https://api.drupal.org/api/drupal/modules%21file%21file.module/function/file_managed_file_process/7.x http://drupal.stackexchange.com/questions/32358/removing-the-upload-button-in-managed-files (Sean Quigley - Jan 10, 2017)
-
Began writing hook_form_alter() extension to file.module. (Sean Quigley - Jan 10, 2017)
-
Downloaded and enabled module to hide upload button when Ajax enabled... (Sean Quigley - Jan 10, 2017)
-
Webform Hide Upload Button module had no effect after rebuilding registries, clearing drush cache/acquia varnish and configuring module. There may be a conflict between file and file_entity modules that prevents this module from working correctly. (Sean Quigley - Jan 10, 2017)
-
Copied file.css from drupal core file module and modified to set visibility to hidden for file upload button. Have tested as both auth and anonymous user and it is working. The only drawback is that the 'Remove' button no longer appears should a user wish to remove a file before submitting form. (Sean Quigley - Jan 10, 2017)
-
New asset is located in .../profiles/asc/themes/q7 and is called q7-form-file.css. Needs to also be ported to responsive theme. (Sean Quigley - Jan 10, 2017)
-
Final testing with the Mildred Munday Scholarship Application that contains two file upload fields. Form submission was successful. (Sean Quigley - Jan 10, 2017)
-
@seanquigley3 we now need to implement the same solution on the ASC site. (Eva Dale - Jan 11, 2017)
-
Added .css file to docroot/sites/all/themes/osu_asc/css and added stylesheet reference to osu_asc.info. Committed to both code.osu.edu and acquia (DEV) repos. (Sean Quigley - Jan 11, 2017)
-
Logged into dev.artsandsciences.osu.edu (after setting up local login). ASC site admin theme does not have stylesheet registry so nothing required here. Created test form and submitted with no problems. Verified that submission results and uploaded file were available or view/download. Need to move to PROD. (Sean Quigley - Jan 11, 2017)
-
Will be included with Canini's deploy to PROD... (Sean Quigley - Jan 11, 2017)
-
Deployed to Acquia PROD on 1/10 for standard sites. (Sean Quigley - Jan 11, 2017)
-
Deployed to Acquia PROD for ASC site. Verified that webforms are working as expected using 'Application for Request of Support for Regional Campus Faculty Research/Creative Activity' form. (Sean Quigley - Jan 11, 2017)
-
Because there was no easy way to enable this one stylesheet for every standard site, added the following PHP code to ../themes/q7/preprocess/preprocess-html.inc:
$node = menu_get_object(); if (isset($node->type) && $node->type == 'webform') { $is_webform = true; drupal_add_css(' .form-managed-file .form-submit, .ajax-processed { visibility: hidden;}', array('type' => 'inline')); }
This just injects the CSS inline while preprocessing, before rendering. (Sean Quigley - Jan 18, 2017)
- After committing change above, removed custom stylesheet from theme on DEV and deployed to PROD. Did not implement this solution on ASC site since there is only one site and theme is structured differently. (Sean Quigley - Jan 18, 2017)