Posted by manop on March 16, 2009 at 11:47pm
| Project: | Acquia Slate |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jwolf |
| Status: | closed (fixed) |
Issue Summary
I used CCK File field with Acquia Slate theme. When I upload the file, the loading icon appears without nothing uploaded. If I switch back to Garland theme, it works fine.
Comments
#1
I've noticed this too. If you simply choose the file without clicking the "upload" button, it uploads ok. For some reason the AJAX uploader breaks.
#2
Unfortunately, tvaughan's comment doesn't work for me. Can't upload images unless I switch to another (any) theme.
Still love this theme.... trying to stick with it.
#3
I'm working on fixing this issue, but I'm having trouble replicating it. Could I get some more information?
- Does the same thing happen for you with File attachments?
- Is this with the 1.0 release or the latest dev release?
- Could someone who is experiencing this issue try it with the dev release to verify that it occurs there as well?
- In which browsers is this occurring?
- Is this occurring in a clean install of Drupal/Acquia Drupal?
- Are there any other AJAX-heavy contrib modules installed?
Thanks very much for your assistance in helping to nail this bug as soon as possible.
Chris Fassnacht
TopNotchThemes.com
#4
Thank you for the response and the nice theme
- File attachment works fine to me. The problem occurs when only I use CCK filefield.
- I used 1.0 release. I will check with dev release soon and let you know.
- I got problem in all browsers I have (Chrome, Firefox, Safari, Opera) on Windows.
- It's my clean install Drupal 6.10.
- The modules I used including:
CCK
FileField
GMap
ImageField
Location
SimpleMenu
Views
When I disabled GMap, Location, and SimpleMenu I still had the same problem.
#5
subscribing to issue
#6
Same here
#7
It breaks no matter what, On 2 different servers, 2 different drupal installs working fresh install sites, just cck, imagefield, imagecache, filefield, ubercart -- other themes work fine, go to slate and upload button just flashes when you click, no action takes place.
#8
The problem is with the custom button themeing code in template.php. More specifically its the extra SPAN tags that get wrapped around the buttons. I fixed this by adding an extra condition on the if statement to not add the extra code to buttons with a #value == 'Upload'
Here is the original if statement on line 665 of the template.php file:
if (stristr($element['#attributes']['style'], 'display: none;') || stristr($element['#attributes']['class'], 'fivestar-submit')) {Here is my new line 665 that fixes this problem:
if (stristr($element['#attributes']['style'], 'display: none;') || stristr($element['#attributes']['class'], 'fivestar-submit') || ($element['#value'] == 'Upload')) {Hope this helps.
#9
Attached is a patch using jasonschulte's fix.
Fix committed.
Thanks jasonschulte
#10
Tried the patch - tried it a couple of times but still get
(Stripping trailing CRs from patch.)
patching file template.php
Hunk #1 FAILED at 662.
1 out of 1 hunk FAILED -- saving rejects to file template.php.rej
after this was not successful I also edited the template.php manually but did not have the issue fixed
using version = "6.x-1.0"
the issue with upload images fixes when going back to Garland
#11
grabbing a 6.x-dev release dated April 3, fixed the problem for me.
#12
changing status to see if my findings are consistent with others
#13
It is known that the patch isn't included in 6.x-1.0 The patch is included in the 6.x-dev release.
If you've manually patched a 1.0 release and it still doesn't work, you've patched to 6.x-dev. As such the version can remain where the patch is already placed, even if it isn't working at this time for you.
I suggest, downloading a new 6.x-dev tar.ball and comparing it's template.php with your own.
#14
@Very Misunderstood- thanks will try the development version - i didn't see your post prior to my changing the status... also I didn't totally understand your very last post... I think you said the patch is for the dev version... i apologize if that was the case... changing to fixed:)
#15
I also committed an improvement to FileField that will make it more resistant to changes in the theme to prevent this problem in the future.
http://drupal.org/cvs?commit=194670
#16
Automatically closed -- issue fixed for 2 weeks with no activity.
#17
The fix only works if the 'Upload' button text is in English and hasn't been altered. Something like this would be more robust:
if (stristr($element['#attributes']['style'], 'display: none;') || stristr($element['#attributes']['class'], 'fivestar-submit') || (is_array($element["#upload_validators"]))) {#18
@henrrrik - Thanks! We'll review ASAP.
#19
fixed in new release > 6.x-1.2
Thanks!
#20
Automatically closed -- issue fixed for 2 weeks with no activity.