Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2010 at 19:54 UTC
Updated:
23 Jul 2010 at 13:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
tilmankoester commentedComment #2
tr commentedFirst, I can't reproduce the error at all. Lots of people use file downloads, and no one has ever mentioned this error, so if it's a problem it's likely due to something in your server environment. Did you perhaps experiment with theming the file downloads page before this happened? Possibly the theme cache wasn't flushed.
Anyway, all the patch does is move the construction of the $header array out of the theme function and into the calling routine. It's still the same array, so the move can't possibly have any effect on the operation of the code. Besides, the appropriate place is in the theme function, not outside it.
If you continue to have this problem then I'm going to need more information to help track it down.
Comment #3
tilmankoester commentedOk, call me crazy, but:
1) I set up a fresh drupal 6.16 install on localhost, the only modules i enable are ubercart 6.x.2.2 and token. And it works fine.
2) I set up another fresh copy, this time with 6.x.2.x-dev, click on "My account" > "Files" (user/*/purchased-files) and get an error: "warning: Invalid argument supplied for foreach() in -snip-/includes/tablesort.inc on line 193."
And if I look at uc_files from 6.x.2.2 and from -dev they are quite different but 2.2 builds a $header array pretty much at the same place I do. (Didnt really look closely, sorry if I am missing something)
I know you're stressed man, but I ran into this problem (and can reproduce it, local and on-line), just thought I'd try and chip in what I found.
If you think it's a non existant problem, please feel free to close the issue.
Regards
Comment #4
tr commentedI hadn't noticed you were using -dev. I tested on 2.2. I'll go back and have another look with -dev.
Comment #5
tr commentedYes, you're right. Looks like the patch in #508430: Create theme function for uc_file user download page broke the -dev version. Thanks for catching that. Moving this back to a bug report ...
I'm glad you're using the -dev version, since there have been a lot of changes and it clearly could use testing before a new version is released!
Comment #6
tilmankoester commentedCreated a proper .patch against CVS.
Sorry didnt do it in first post, and sorry for specifically saying it's for the -dev version. I was in a rush.
Glad you can reproduce it. Was starting to doubt my sanity.
Comment #7
univate commentedI haven't tested it but the code looks like it should fix that error.
The only things I would suggest are:
* put the header variable first - so it matches the order theme_table() uses.
* update the uc_file_theme function to include the new variable.
Comment #8
tr commentedMarked #762230: UC File headers not properly used as a duplicate.
Comment #9
rhimes commentedsame errors, patch in #6 works for me!
Comment #10
cha0s commentedStill broken?
Comment #11
ufku commentedHandles the issue by introducing a new function returning the header.
No need for a change in theme function.
Comment #12
univate commentedI think I prefer the solution in #6 with the minor suggestions I made in #7.
Attached patch.
Comment #13
Island Usurper commentedLooks good to me. Thanks, guys. Committed.