Upgrade project module to 6.x
douggreen - July 8, 2007 - 15:08
| Project: | Project |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | task |
| Priority: | normal |
| Assigned: | aclight |
| Status: | patch (code needs work) |
Description
Attached is a first cut at the 6.x upgrade based on CVS HEAD. It also includes some coding style fixes. This upgrade patch was assisted by the coder 6.x upgrade review. I left several @TODO comments in the code, where I wasn't sure what to do.
See also project_issue 6,x upgrade.

#1
I forgot to attach the patch...
#2
Thanks for getting this started. However, 2 big problems. ;)
1) We don't even have a 5.x-1.0 release yet (it's a long story), so this is premature.
2) Please do NOT include code style changes and API upgrade changes in the same patch. Ever. ;) See http://drupal.org/node/154190. So, if you want to be truly helpful, you'd submit a *separate* issue for the code-style changes, and include patches for HEAD (5.x-0.x-dev) DRUPAL-4-7--2 and DRUPAL-4-7. Then, the upgrade patch can focus on API changes, and not code style.
Thanks!
-Derek
#3
I think it's time to re-activate this issue.
#4
please see http://groups.drupal.org/node/6180 for the full project road map which will get us to 6.x intelligently.
there are other things to handle before we can start the actual porting of the code.
#5
Right. This issue, as titled, can't start until more things on http://groups.drupal.org/node/6180 are done, which is why we left this postponed.
#6
Here's a start on the patch. At the moment I've really only ported the project module, and even then there are many problems. One big one is that I've commented out project_page_overview(), since that will be replaced by views integration. There are also problems with breadcrumbs on project nodes, links on project nodes to taxonomy terms used, and the project settings administrative page gives a WSOD.
I've done a fair amount of the project_release port, but got stuck with some FAPI3 problems in project_release_validate() and so stopped.
I think the only thing I did for the project_usage module was fix the changes required for l() and url().
Also, I've added hook_scheme() implementations for all 3 modules.
BTW, I know we've still got several outstanding issues in the queue that need to be reviewed and fixed, but several of those affect project_page_overview(), which may not even exist in the D6 version, so I figured there was no need to wait until those fixes get in.
#7
This fixes admin/project and admin/project/project-settings.
#8
Here's an updated version. For the project module itself, I've gone through the entire list of things to do to upgrade your module at http://drupal.org/node/114774, and I believe I've done everything with the following exceptions:
JavaScript behaviors: new approach to attaching behaviors (needs to be fixed in project.js) @js[edit 5-14-2008 by aclight: Fixed in patch on comment 9]The project_release and project_update modules are partially completed, but not as far along as project.
There's also a start at views support (for the project module only), but it's certainly a work in progress and I don't think I've included the default views yet.
#9
This patch takes care of most of the porting tasks for the project_release module, with the exception of most of the FAPI stuff that needs to be done.
For the project_release module, my list of stuff that needs to be done looks like this right now:
Add project and project-release classes to the node edit forms [REGRESSION][Fixed by patch in comment 11]The patch also takes care of item #7 in comment 8 of this issue (JavaScript behaviors).
Previewing of project and project_release nodes has been fixed. However, there is a regression in that the "project" or "project-release" class is no longer added to the node edit form.
This patch also includes the default views (as I've got them so far) for both the project and project_release modules. I've only made a few fields handled by the project_release module available to views so far, but they are the important ones.
#10
A few minor changes of the views.
#11
This patch:
* fixes theming of project and project_release node forms (#14 of comment 9).
* Fixes the view at node/[nid]/release so that if the user does not have access to view the project node then the view returns a 404.
#12
Subscribe
#13
Reroll and subscribe.
Patch from http://drupal.org/node/256975 removed, as it was committed.
Forward ported http://drupal.org/node/168009.
Additional TODOs:
Need to forward port http://drupal.org/node/267854.
project_page_overview logic was changed in http://drupal.org/node/235037 to fix a bug, the view that replaces it needs to be checked to make sure it didn't have the same error.
(Sorry about the $Name$ bands stuck in, I couldn't get my cvs client to ignore them.)
#14
Just FYI, I've been bad about posting my recent work, but I have already done all of the things in the patch with #13 as well as the additional TODOs mentioned there.
I'll try to remember to post a more recent patch tomorrow, now that I've gotten a lot of the views related problems I've had for the past few weeks solved.
#15
webchick needed a more recent patch before getting on a plane, so here it is. I didn't get a chance to check it thoroughly to make sure that there aren't any problems with it.
#16
For all those who care, I've created a Subversion repository on devguard in which I'll be keeping code for the port of the project module to D6. You can check there for the latest code. The only thing that might not be updated as frequently are the default views, since I have to manually export those whenever I change them.
The repository, which allows anonymous read-only access, is at:
https://aclight.devguard.com/svn/project
If you'd like an account so you can commit or view the code via WebSVN, please contact me.
#17
Don't get me wrong - I'm really happy that you are working on this upgrade, but don't we have a good development system on d.o? :-)
#18
@hass: No, not in this case. I am not a project module maintainer, and therefore can't commit code to CVS. I could use my CVS sandbox on d.o but I hate CVS, and using devguard I also have access to Trac so I can keep track of what needs to be done on something other than a post it note on my desk.
If this was my project, i'd probably do things differently and use the d.o infrastructure for all of this. But I'm not, so I'm not.
#19
Hopefully you are not only wasting your time.
#20
@hass , we more often than not create throwaway svn copies of a patch so that we can work on it together. it's pointless to record the whole struggle in drupal.org cvs. You are welcome to follow up with more off topic and annoying the good folks in here. But be aware that I will ban you from drupal.org if you annoy the project developers who are really far and few between. Be gladful (in silence!) for not being banned long ago for annoying the heck out of the core developers.
#21
Don't get me wrong, I appreciate a lot all the work done. But I'm a new user, I use D6 and I feel really confused. I was looking for a module to create a "project node" and I found the module "Project"
- This should be the main page: http://drupal.org/project/project but I found no D6 release
- Then I found this road-map page http://groups.drupal.org/node/6180 but it ends with no results and an old post (2008-06-26)
- Then I found (probably related) page http://groups.drupal.org/node/6186 (with a wonderful mock http://groups.drupal.org/node/6186#comment-17797) but last post was on 2007-12-23 and it ends with no meaningful result
- I discovered that Project Issue depends on Project and it has a dev release for D6
- Then I found this page, where it seems that the only one working on the module is aclight in a independent way. And more this seems to be a module to upgrade 5.7 module to 6, not a module for 6.
So finally, I don't understand nothing :-) . Probably I miss something or I didn't understand something important. Please give me hint to understand what's going on.
For sure it seems very strange to me that a so important module is also so confused.
#22
leave the title intact. An upgrade is the same as a port is the same as a 6.x release. It hasn't happened yet. Alot has to happen with this module to make it D6 ready and get drupal.org D6 ready.
This module is not light, you can get involved and do some heavy lifting if you have the skillset.
#23
thanks for the infos. I'm sorry that it's not ready yet. It's really a pity. Anyway there are a lot of interesting modules not yet ready for D6 (ex. ACL). This means that probably is not a joke to port from 5 to 6 and probably for me it's wiser to delete my D6 web site and to setup a D5.7
Unfortunately I'm not skilled enough with Drupal to help and I'm already involved in another PHP project, so I don't have enough time. Anyway if the result is something similar to this screenshot http://groups.drupal.org/node/6186#comment-17797 ... well keep on coding because it's really awesome. ;-)
good luck
#24
changing title
#25
Patch attached changes "release/project_release.js" functions to be included with Drupal.behaviors and no more doc.ready logic. Untested, needs review.
#26
Here is patch to fix many translatable strings to be more consistent with core, more context sensitive (this part needs nevertheless more fixes - for e.g in
class project_views_handler_filter_project_type_vid), fixes some missing periods and missing words, etc.Both patches apply are against aclight's SYN.
#27
@hass: Thanks for the patches. For the strings patch, for changes to stuff that's already in the official code base (on d.o), please create a separate issue in the queue with a patch for those items to the 5.x dev version. Once the changes get committed to the official version, then a patch against https://aclight.devguard.com/svn/project would be great. But I don't want to start committing changes to the D6 port version that are unrelated to the port itself until those changes are committed to the official version of the module.
For changes to new files (like the views stuff), you can just submit a patch for those here if you'd like and I'll review and commit as appropriate.
Thanks
#28
#25 is a D6 patch only.
#26 The time wasting job I've done here is to make future code better. And as every time said everywhere - code need to go first into HEAD (your SYN) and then it will be backported.
#29
@hass: You're right, new code typically goes into HEAD first and is then backported to previous versions. Bit that's not exactly how the port is working. Since I am the only one that can commit to the SVN repo of the D6 version, and since I am not an actual maintainer of project*, I think it makes more sense to have things that apply to the module as is committed there first. That way the code is appropriately reviewed, etc. That's why I asked you to create separate issues for patches that address problems in the module as it is in the current version.
#30
See #290150: Fix many translatable strings and #290151: D6: Use Drupal.behaviors in JS.
#31
Could you provide a drupal 6 branch of the project, it would allow more people to install and test the module?
Thanks
#32
@rastatt@drupal.org: That will happen in the (not too distant) future. As long as you have subversion installed on your server, the D6 code is still very easy to check out.
svn co https://aclight.devguard.com/svn/project .#33
subscribe
#34
subscribe
#35
subscribing
#36
#37
tested with Drupal 6.4 and Views 6.x-2.0-rc3
wont install: Fatal error: Class 'views_plugin_row' not found in /sites/all/modules/project/project.views.inc on line 330
#38
Subscribing
#39
Subscribing
#40
@japanitrat
I can confirm this.
#41
@japanitrat, 0xAFFE,
The 6.x branch of project has not been updated for the views 2.x API changes made between rc1 and rc2. Downgrade your views module to rc1 if you want to test out the current project module.
Silvio
#42
@#41: Yes, that's correct, I haven't done any work on this for a while. If you use views rc1, you'll run into other bugs (minor, I think) that were fixed after rc1 and before the Views 2 API change that led to rc2.