Closed (fixed)
Project:
Project
Version:
6.x-1.x-dev
Component:
Releases
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
23 Dec 2010 at 19:18 UTC
Updated:
7 Jan 2011 at 17:50 UTC
Jump to comment: Most recent file
We've talked about this in multiple places, and kept trying to work-around it, but I think it's going to be impossible to finish #11416: Please provide *.zip downloads. and have everything display consistently without finally adding a weight column to {project_release_file}. I don't even care if there's no UI for it (at least not yet). We just need a way to record and order things (especially the various views related to release files) that doesn't rely on fid, since we're not going to be able to make that work consistently. Hopefully this will be relatively quick. Stay tuned.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1006346-7.project-release-file-weight.patch | 11.32 KB | dww |
| #6 | 1006346-6.drupalorg_project-project_release_file-weight.patch | 3.68 KB | dww |
| #3 | 1006346-3.drupalorg_project-project_release_file-weight.patch | 2.34 KB | dww |
| #2 | 1006346-2.project_release_files_view.patch | 927 bytes | dww |
| #1 | 1006346-1.project-release-file-weight.patch | 10.13 KB | dww |
Comments
Comment #1
dwwI'm punting the d.o-specific initialization of {project_release_file}.weight (to handle our profile stuff) to a separate patch against drupalorg_project (I'll still attach that here), but I wanted to get this much up for review. I've tested the DB update and the views stuff a bit, all seems to be fine. Any objections?
Comment #2
dwwOne more hunk for one of the default views. The other is going to be changed over at #11416: Please provide *.zip downloads. (and possibly #1006238: Add a weight limit for project_release_handler_field_files) so I don't think it's worth fixing that one in this issue.
Comment #3
dwwHere's a totally untested patch for drupalorg_project to initialize the weight properly for our files.
Comment #4
dwwI just took those subselects, turned them into COUNT(*) queries, and ran on the live DB. Looks right. ;)
Comment #5
dww#3 needs work, since you can't update {project_release_file} with a subselect that JOINs on the same table:
Originally in IRC, nnewton and I discussed running 1 query to find all the records we need to update, saving that in RAM in PHP, and then just updating all those records with other queries. So, that's what I'll do. I just have to wait until morning, since I really need sleep now.
Comment #6
dwwA bit ugly, but this totally works. Ran very quickly on beta.d.o.
Comment #7
dwwGiven #1006238: Add a weight limit for project_release_handler_field_files I needed to slightly fix the weight logic in package-release-nodes.php for install profiles. I also folded the patch from #2 into this.
Comment #8
dwwCommitted #7 to HEAD of project. Still waiting on a review of #6 before I commit that to drupalorg_project. ;)
Comment #10
dwwMoving to drupalorg.module's queue for now. Shut up, bot. ;) #6 (against drupalorg_project.install) still needs review...
Comment #11
nnewton commentedReviewed #6 from a performance standpoint and this should be fine to run on live.
-N
Comment #12
dwwCommitted #6 to drupalorg HEAD, merged into bzr, deployed, and ran update.php (was nearly instantaneous).
It's working fine, e.g. the order of files here are correct:
http://drupal.org/node/945570
(first full profile with core, then the "no-core" profile with all the projects, and finally the profile-only release).