Gallery 3 Uploadify implementation doesn't require the "SecFilterEngine Off" modification at all, uploading works out of the box
I'd ask the G3 uploadify developer if he had to do anything special to get around this.
Or ask the uploadify developer.
I only integrated for G2 - I did not develop the app.
Anything you report back, I'd be happy to implement.
for now, I'll use your module/plugin on my G2 standalones, since Uploadify loads pretty FAST.
thanks again, suprsidr!
scaturan
Joined: 2004-09-12
Posts: 1153
Posted: Mon, 2010-07-12 18:43
correction:
i was mistaken, just saw this on /gallery3/.htaccess
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-07-12 22:09
Flash's crappy security works like this:
load the swf from www.yoursite.com... and gallery at www.yoursite.com... : ok
But if you're loading the swf from yoursite.com.... and gallery at www.yoursite.com... : cross-domain security issue.
So check the domain/sub-domain of your uploadify object and its gallery url.
Sorry mate I wasnt too clear. The situation is if i upload say 400 files gallery shows 384 and I have to trawl through the pictures to find the missing ones.
And reupload and uploadify doesnt report any errors.
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-07-25 15:46
I've already set the javascript onError function to sticky, are you saying the error msg does not persist for you?
You could easily have jQuery append the error msg text to some element on the page in the onError function
I'm betting there is no errors as far as Uploadify is concerned. I'm betting the images are getting uploaded just fine to Gallery. It's probably Gallery chocking on a few images, probably running into resource limits.
Could you post your system info from Site Admin > Maintenance > System Information
Gallery URL = http://www.pistonspy.com/gallery2new/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.13 apache2handler
Webserver = Apache/2.2
Database = mysqli 5.0.77-log, lock.system=flock
Toolkits = LinkItemToolkit, Thumbnail, ArchiveUpload, Getid3, ImageMagick
Acceleration = partial/900, partial/900
Operating system = Linux php5-n130.wc1.dfw1.stabletransit.com 2.6.32.12-10.mosso5.x86_64 #1 SMP Thu Jun 17 11:29:38 CDT 2010 x86_64
Default theme = nzdi
gettext = enabled
Locale = en_GB
Browser = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Creative AutoUpdate v1.40.01)
Rows in GalleryAccessMap table = 20
Rows in GalleryAccessSubscriberMap table = 85718
Rows in GalleryUser table = 144
Rows in GalleryItem table = 85690
Rows in GalleryAlbumItem table = 160
Rows in GalleryCacheMap table = 200035
morden
Joined: 2010-08-05
Posts: 1
Posted: Thu, 2010-08-05 13:07
Just wanted to add: I've had trouble in the past using Flash-based uploaders with Kaspersky Internet Security.
I installed the plugin earlier and was getting undefined errors. I disabled Kaspersky temporarily and the files uploaded just fine.
FYI
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-08-05 16:02
I recently ran into some auth errors while adding uploadify directly to the story editor on my niece's site. I had done the same on two other sites without a hitch.
Basically Gallery considered my new uploads as "REQUEST FORGED" on her site, but not on the two other identical sites. Strange I thought!
So I simply disabled the auth checks in Uploadify.inc
I changed omitAuthTokenCheck to true and commented out the call to assertIsGenuineRequest
Does uploadify support drag and drop? This module does not seem to support it. Is this something I can turn on in the code? Thanks for the module, nice.
thanks.
maravizzo
Joined: 2005-09-11
Posts: 49
Posted: Tue, 2010-10-26 07:22
Hi Suprsidr,
Thanks for this upload module, it's fantastic!
It works perfectly in standalone Gallery, but can't get it to work in Drupal embedded Gallery.
You said that if jquery is loaded somewhere else in the page it can make uploadify not working... And this is definitely the case: in the page code I see twice jQuery.extend(Drupal.settings... at the very top and very bottom of the page, so pour Uploadify is completely surrounded!
Is there any workaround?
Firefox's console reports: Error: jQuery("#uploadify").uploadify is not a function
Thank you
bye
No, feel free to add the functionality - the beauty of open source ;)
Remy has some great examples here.
@maravizzo basically you need jQuery to be defined, then its plugins in that order.
So try adding these 2 lines at the top of gallery2/modules/uploadify/templates/ItemAddUploadify.tpl
I tried to install and use this today and got this response:
------------------
Security Violation
The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER) : Smarty error: The template 'modules/uploadify/templates/ItemAddUploadify.tpl' does not exist.
* in modules/core/classes/GallerySmarty.class at line 76 (GalleryCoreApi::error)
* in modules/core/classes/GalleryTemplate.class at line 442 (GallerySmarty::trigger_error)
* in ??? at line 0 (GalleryTemplate::resourceGetTemplate)
* in lib/smarty/Smarty.class.php at line 1559
* in lib/smarty/Smarty.class.php at line 1414 (Smarty::_fetch_resource_info)
* in lib/smarty/Smarty.class.php at line 1866 (Smarty::_compile_resource)
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%45^45D^45D68BF5%%ItemAdd.tpl.php at line 49 (Smarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1868
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%AD^AD3^AD313681%%ItemAdmin.tpl.php at line 71 (Smarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1868
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%54^54D^54D7A448%%admin.tpl.php at line 4 (Smarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1868
* in modules/core/classes/GalleryTemplateAdapter.class at line 906 (Smarty::_smarty_include)
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 58 (GalleryTemplateAdapter::theme)
* in lib/smarty/Smarty.class.php at line 1262
* in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 219 (GallerySmarty::fetch)
* in main.php at line 521 (GalleryTemplate::fetch)
* in main.php at line 104
* in main.php at line 88
System Information
Gallery version 2.3.1
PHP version 5.2.14 cgi-fcgi
Webserver Apache
Database mysqli 5.1.39-log
Toolkits SquareThumb, ImageMagick, Thumbnail
Operating system Linux wario 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
-------------
I tried setting SecFilterEngine Off as recommended above but that made gallery unusable - got a server error.
System info:
Gallery URL = http://www.gallery2.384thbombgroup.com/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.14 cgi-fcgi
Webserver = Apache
Database = mysqli 5.1.39-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Ffmpeg, Getid3, ImageMagick, jpegtran, LinkItemToolkit, Thumbnail, SquareThumb
Acceleration = none, none
Operating system = Linux wario 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
Rows in GalleryAccessMap table = 134
Rows in GalleryAccessSubscriberMap table = 10256
Rows in GalleryUser table = 2
Rows in GalleryItem table = 10253
Rows in GalleryAlbumItem table = 258
Rows in GalleryCacheMap table = 0
What next?
nivekiam
Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-11-02 21:22
Quote:
Error (ERROR_BAD_PARAMETER) : Smarty error: The template 'modules/uploadify/templates/ItemAddUploadify.tpl' does not exist.
Something not quite right happened when you unzipped the archive and uploaded it. Everything is in one directory. There should be a /lib and /templates directory
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
f3red
Joined: 2005-11-04
Posts: 13
Posted: Wed, 2010-11-03 01:01
Hmmm ... I'll try it again and see.
CumGranoSalis
Joined: 2008-02-18
Posts: 8
Posted: Mon, 2010-12-27 23:28
Uploadify does not run in an embeded Gallery 2 in Drupal 6:
* called embeded through drupal does not work, seems to be a problem with the double jquery load (SWF File not loaded, browse text field not hidden, browse button is no graphic, no error message at all)
but I'm still unable to select "Clear" or "Upload" the files added on the upload list.
I see this error on Firefox 3
Error: uncaught exception: Error in Actionscript. Use a try/catch block to find error.
Any pointers would be much appreciated. Please advise, thank you!
scaturan
Joined: 2004-09-12
Posts: 1153
Posted: Sun, 2011-02-06 17:47
forgot to mention that crossdomain.xml is never requested - I have Apache configure to log "every" request, but no verification that crossdomain.xml is access from anywhere, by any script.
Posts: 8339
I'd ask the G3 uploadify developer if he had to do anything special to get around this.
Or ask the uploadify developer.
I only integrated for G2 - I did not develop the app.
Anything you report back, I'd be happy to implement.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1153
just came across http://sourceforge.net/apps/trac/gallery/ticket/746 - looks like tnalmdal worked on it. I'll ask around IRC for some hints.
for now, I'll use your module/plugin on my G2 standalones, since Uploadify loads pretty FAST.
thanks again, suprsidr!
Posts: 1153
correction:
i was mistaken, just saw this on /gallery3/.htaccess
Posts: 8339
Flash's crappy security works like this:
load the swf from www.yoursite.com... and gallery at www.yoursite.com... : ok
But if you're loading the swf from yoursite.com.... and gallery at www.yoursite.com... : cross-domain security issue.
So check the domain/sub-domain of your uploadify object and its gallery url.
Flash does not accept www. as the same as .
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 14
Is there anyway to introduce any error checking as it goes through and uploads all the pics but some are missing and not in the gallery.
And no log to show which are missing is this difficult to do??
Posts: 8339
I guess I don't get what you mean.
It reports upload errors.
If the files are missing, you cannot select them to upload.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 14
Sorry mate I wasnt too clear. The situation is if i upload say 400 files gallery shows 384 and I have to trawl through the pictures to find the missing ones.
And reupload and uploadify doesnt report any errors.
Posts: 8339
I've already set the javascript onError function to sticky, are you saying the error msg does not persist for you?
You could easily have jQuery append the error msg text to some element on the page in the onError function
gallery2/modules/uploadify/templates/ItemAddUploadify.tpl
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16504
I'm betting there is no errors as far as Uploadify is concerned. I'm betting the images are getting uploaded just fine to Gallery. It's probably Gallery chocking on a few images, probably running into resource limits.
Could you post your system info from Site Admin > Maintenance > System Information
And a link to phpinfo:
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 14
http://www.pistonspy.com/phpinfo.php
Hope this helps
Gallery URL = http://www.pistonspy.com/gallery2new/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.13 apache2handler
Webserver = Apache/2.2
Database = mysqli 5.0.77-log, lock.system=flock
Toolkits = LinkItemToolkit, Thumbnail, ArchiveUpload, Getid3, ImageMagick
Acceleration = partial/900, partial/900
Operating system = Linux php5-n130.wc1.dfw1.stabletransit.com 2.6.32.12-10.mosso5.x86_64 #1 SMP Thu Jun 17 11:29:38 CDT 2010 x86_64
Default theme = nzdi
gettext = enabled
Locale = en_GB
Browser = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Creative AutoUpdate v1.40.01)
Rows in GalleryAccessMap table = 20
Rows in GalleryAccessSubscriberMap table = 85718
Rows in GalleryUser table = 144
Rows in GalleryItem table = 85690
Rows in GalleryAlbumItem table = 160
Rows in GalleryCacheMap table = 200035
Posts: 1
Just wanted to add: I've had trouble in the past using Flash-based uploaders with Kaspersky Internet Security.
I installed the plugin earlier and was getting undefined errors. I disabled Kaspersky temporarily and the files uploaded just fine.
FYI
Posts: 8339
I recently ran into some auth errors while adding uploadify directly to the story editor on my niece's site. I had done the same on two other sites without a hitch.
Basically Gallery considered my new uploads as "REQUEST FORGED" on her site, but not on the two other identical sites. Strange I thought!
So I simply disabled the auth checks in Uploadify.inc
I changed omitAuthTokenCheck to true and commented out the call to assertIsGenuineRequest
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 13
Does uploadify support drag and drop? This module does not seem to support it. Is this something I can turn on in the code? Thanks for the module, nice.
thanks.
Posts: 49
Hi Suprsidr,
Thanks for this upload module, it's fantastic!
It works perfectly in standalone Gallery, but can't get it to work in Drupal embedded Gallery.
You said that if jquery is loaded somewhere else in the page it can make uploadify not working... And this is definitely the case: in the page code I see twice jQuery.extend(Drupal.settings... at the very top and very bottom of the page, so pour Uploadify is completely surrounded!
Is there any workaround?
Firefox's console reports: Error: jQuery("#uploadify").uploadify is not a function
Thank you
bye
------------------------------------------
My Gallery sites:
http://www.zorring.org/
Posts: 8339
No, feel free to add the functionality - the beauty of open source ;)
Remy has some great examples here.
@maravizzo basically you need jQuery to be defined, then its plugins in that order.
So try adding these 2 lines at the top of gallery2/modules/uploadify/templates/ItemAddUploadify.tpl
Don't forget to clear your template cache afterwards.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 49
Great, it works perfectly now!! Thanks a lot!
Ciao
Matteo
------------------------------------------
My Gallery sites:
http://www.zorring.org/
Posts: 13
I tried to install and use this today and got this response:
------------------
Security Violation
The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER) : Smarty error: The template 'modules/uploadify/templates/ItemAddUploadify.tpl' does not exist.
* in modules/core/classes/GallerySmarty.class at line 76 (GalleryCoreApi::error)
* in modules/core/classes/GalleryTemplate.class at line 442 (GallerySmarty::trigger_error)
* in ??? at line 0 (GalleryTemplate::resourceGetTemplate)
* in lib/smarty/Smarty.class.php at line 1559
* in lib/smarty/Smarty.class.php at line 1414 (Smarty::_fetch_resource_info)
* in lib/smarty/Smarty.class.php at line 1866 (Smarty::_compile_resource)
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%45^45D^45D68BF5%%ItemAdd.tpl.php at line 49 (Smarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1868
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%AD^AD3^AD313681%%ItemAdmin.tpl.php at line 71 (Smarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1868
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%54^54D^54D7A448%%admin.tpl.php at line 4 (Smarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1868
* in modules/core/classes/GalleryTemplateAdapter.class at line 906 (Smarty::_smarty_include)
* in /home/prelleru/preller.us_384thBombGroupWebsite_gallery2_g2data/smarty/templates_c/%%3084791158/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 58 (GalleryTemplateAdapter::theme)
* in lib/smarty/Smarty.class.php at line 1262
* in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 219 (GallerySmarty::fetch)
* in main.php at line 521 (GalleryTemplate::fetch)
* in main.php at line 104
* in main.php at line 88
System Information
Gallery version 2.3.1
PHP version 5.2.14 cgi-fcgi
Webserver Apache
Database mysqli 5.1.39-log
Toolkits SquareThumb, ImageMagick, Thumbnail
Operating system Linux wario 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
-------------
I tried setting SecFilterEngine Off as recommended above but that made gallery unusable - got a server error.
System info:
Gallery URL = http://www.gallery2.384thbombgroup.com/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.14 cgi-fcgi
Webserver = Apache
Database = mysqli 5.1.39-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Ffmpeg, Getid3, ImageMagick, jpegtran, LinkItemToolkit, Thumbnail, SquareThumb
Acceleration = none, none
Operating system = Linux wario 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
Rows in GalleryAccessMap table = 134
Rows in GalleryAccessSubscriberMap table = 10256
Rows in GalleryUser table = 2
Rows in GalleryItem table = 10253
Rows in GalleryAlbumItem table = 258
Rows in GalleryCacheMap table = 0
What next?
Posts: 16504
The directory structure isn't correct:
http://www.gallery2.384thbombgroup.com/modules/uploadify/
Something not quite right happened when you unzipped the archive and uploaded it. Everything is in one directory. There should be a /lib and /templates directory
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 13
Hmmm ... I'll try it again and see.
Posts: 8
Uploadify does not run in an embeded Gallery 2 in Drupal 6:
* called embeded through drupal does not work, seems to be a problem with the double jquery load (SWF File not loaded, browse text field not hidden, browse button is no graphic, no error message at all)
* it runs called stand alone with no probs
DID YOU CHECKED THIS AS A POSSIBLE SOLUTION: http://api.jquery.com/jQuery.noConflict/
Thanks.
Posts: 8339
jQuery would not conflict with jQuery, that method is to avoid conflicting with other libraries that use the $ (like mootools)
So you'll notice Uploadify module uses jQuery instead of $
But a solution for your situation may be in this thread already.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 2
How to put Uploadify in the first boot menu?
Posts: 1153
Hey suprsidr,
This is what I have on both the ~/htdocs/crossdomain.xml for the codebase & multisite.
I had to modify the following to get rid of partial HTTPS notices:
~/uploadify/ItemAddUploadify.inc
$template->javascript('https://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js');
to enable the "Browse" button so I can select files:
~/uploadify/templates/ItemAddUploadify.tpl
to
but I'm still unable to select "Clear" or "Upload" the files added on the upload list.
I see this error on Firefox 3
Error: uncaught exception: Error in Actionscript. Use a try/catch block to find error.
Any pointers would be much appreciated. Please advise, thank you!
Posts: 1153
forgot to mention that crossdomain.xml is never requested - I have Apache configure to log "every" request, but no verification that crossdomain.xml is access from anywhere, by any script.