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.

CommentFileSizeAuthor
#19 button-translate.patch1.18 KBjwolf
#9 upload-fix.patch1004 bytesjwolf

Comments

tvaughan’s picture

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.

jboeger’s picture

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.

sociotech’s picture

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

manop’s picture

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.

horncologne’s picture

subscribing to issue

betz’s picture

Same here

jwjoshuawalker’s picture

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.

jasonschulte’s picture

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.

jwolf’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Fixed
StatusFileSize
new1004 bytes

Attached is a patch using jasonschulte's fix.
Fix committed.

Thanks jasonschulte

henns20’s picture

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

vm’s picture

grabbing a 6.x-dev release dated April 3, fixed the problem for me.

henns20’s picture

Version: 6.x-1.x-dev » 6.x-1.0
Status: Fixed » Needs review

changing status to see if my findings are consistent with others

vm’s picture

Version: 6.x-1.0 » 6.x-1.x-dev

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.

henns20’s picture

Status: Needs review » Fixed

@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:)

quicksketch’s picture

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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

henrrrik’s picture

Status: Closed (fixed) » Active

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"]))) {
jwolf’s picture

Assigned: Unassigned » jwolf
Status: Active » Needs review

@henrrrik - Thanks! We'll review ASAP.

jwolf’s picture

Status: Needs review » Fixed
StatusFileSize
new1.18 KB

fixed in new release > 6.x-1.2

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.