Upload Multiple problem in FireFox
PermalinkThe function works fine in IE.
Any help would be greatly appreciated.
If you type a letter into the file name field then files starting with that letter will show for you to select. you can then add them to the upload list one at a time. very slow and tedious.
Colin
In \concrete\tools\files\import.php
find and comment out this line:
$types = $ch->serializeUploadFileExtensions($types);
add:
$types='*.*';
Your code should now look like this
//$types = $ch->serializeUploadFileExtensions($types); $types='*.*';
The file type validation set up in concrete/config/app.php will still stop unwanted filetypes from being uploaded.
I believe the problem is an incompatiblity between Firefox and some recent update to Windows 7. I can recreate the problem on Firefox 13 with a recently updated Windows 7 system. I can't recreate the problem with Firefox 13 or 14 on an as yet un-updated Windows 7 system.
I personally don't think the problem is related solely to Windows 7 as I'm running Vista and still got this issue. However the update could apply to both Vista and Windows 7.
Maybe it is to do with the new FF and Flash having some incompatibility.
Anyway, thanks again for the fix.
Please specify your specifics
Operating System/version
Browser version
Concrete version
Also please as a check copy/paste the specific code changes you made to import.php (including several lines above and below the change) -- or download the file, turn it into a txt file, and attach to your message.
ENVIRONMENT:
# concrete5 Version 5.5.2.1 # concrete5 Packages Designer Content (3.1), Galleria image gallery (2.0), Toolbar Quick Links (1.0), Yosemite (1.0). # concrete5 Overrides blocks/autonav, blocks/home_feature_block, blocks/main_half_left_a, blocks/main_half_right_a, blocks/slideshow, blocks/sub_title_block, blocks/test_block, blocks/thumbnail_index_item, jobs/poll_ldap_users.php, themes/landoll_steel_2012 # Server Software Microsoft-IIS/7.5 # Server API cgi-fcgi # PHP Version 5.3.9 # PHP Extensions bcmath, bz2, calendar, cgi-fcgi, com_dotnet, Core, ctype, curl, date, dom, ereg, exif, filter, ftp, gd, gettext, gmp, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, pgsql, Phar, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, sqlsrv, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, zip, zlib. # PHP Settings
MODIFIED import.php AS FOLLOWS:
<?php defined('C5_EXECUTE') or die("Access Denied."); $u = new User(); $ch = Loader::helper('concrete/file'); $h = Loader::helper('concrete/interface'); $form = Loader::helper('form'); $fp = FilePermissions::getGlobal(); if (!$fp->canAddFiles()) { die(t("Unable to add files.")); } //$types = $fp->getAllowedFileExtensions(); $types='*.*'; $searchInstance = $_REQUEST['searchInstance']; $ocID = $_REQUEST['ocID']; $types = $ch->serializeUploadFileExtensions($types);
OS VERSION:
Windows 7 Professional (64 bit)
BROWSER MAKE/VERSION:
Firefox 14.0.1
I also have IE9 and Chrome installed on my computer, neither of them exhibit this problem.
Thanks for your help!
The *.* change you made to import.php is where Firefox learns what files to display on its file browser. There are other places around the concrete rats nest of code where the file types get reviewed. But that change should tell Firefox that you want all available filetypes displayed (although not available for upload).
So why isn't his happening? Since we have similar systems, the likely fault lies in the communications between your server and the file browser in Firefox. For example: the *.* is not getting done because the old info is (a) in the browser's cache or (b) in some kind of cache the your server is using. Or (c) you uploaded the change to the wrong directory or other asleep-at-the-switch mistake (of which I am SO regularly guilty that I have no problem saying 'these things happen').
SO: check the upload, check the server isn't caching and sending an old file, check that Firefox isn't caching an old file. Maybe this will work? Or maybe you just get to hope that Concrete's Smart Guys get around to fixing the problem.
Has this problem been submitted as a bug report anywhere?
Because its use array argument in some another page.
so you can write like
$types = array();
With Opera 12.02 (Linux) it works fine.
To fix create a file /helpers/concrete/file.php with code below.
<?php defined('C5_EXECUTE') || die(t('Access Denied.')); class SiteConcreteFileHelper extends ConcreteFileHelper { public function serializeUploadFileExtensions($types){ $serialized = ''; $types = preg_replace(self::REGEX_INVALID_EXTENSION_CHARS,'',$types); foreach ($types as $type) { $serialized .= '*.'.$type.'; '; } //removing trailing ; unclear if multiupload will choke on that or not $serialized = substr ($serialized, 0, strlen($serialized)-1); return $serialized; } }
and then added your code...it seemed to break the file manager. Am I doing it right or do I need to edit the file /concrete/helpers/concrete/file.php and if so which bit should I edit.
Sorry could you expand on this please....?
Thanks
If you think, change the core code. Only a space is required in the foreach after the semicolon.
and multiple upload work find, although in some PC you must update your flash extension from adobe
flv, jpg, gif, jpeg, ico, docx, xla, png, psd, swf, doc, txt, xls, xlsx, csv, pdf, tiff, rtf, m4a, mov, wmv, mpeg, mpg, wav, avi, m4v, mp4, mp3, qt, ppt, pptx, kml, xml, JPEG, JPG
i am using 5.4.2.x, maybe because i update my firefox and new firefox start to strict uppercase and lowercase
My first guess is the updates that have been recently pushed out to FF. There have been no changes to C5 since then - at least none that we have applied to our environment.
I'll continue to research this and let you know if I find anything.