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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

douggreen’s picture

FileSize
54.76 KB

I forgot to attach the patch...

dww’s picture

Status: Needs work » Postponed

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

Gerhard Killesreiter’s picture

Status: Postponed » Active

I think it's time to re-activate this issue.

hunmonk’s picture

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.

dww’s picture

Status: Active » Postponed

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.

aclight’s picture

Status: Postponed » Needs work
FileSize
124.59 KB

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.

aclight’s picture

FileSize
127.97 KB

This fixes admin/project and admin/project/project-settings.

aclight’s picture

FileSize
150.4 KB

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:

  1. Entirely new menu system (need to delete stuff that's no longer necessary) @menu
  2. Major FormAPI improvements @FAPI
  3. New module_load_include() and module_load_all_includes() functions for developers (probably nothing needs to be done here)
  4. New hook_theme() registry @theme (possibly theme project nodes via a project.tpl.php file?)
  5. template_preprocess_* with .tpl.php files @theme
  6. Node previews and adding form fields to the node form @FAPI (I'm not sure if I need to do something for this)
  7. 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.

aclight’s picture

FileSize
245.5 KB

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:

  1. Major FormAPI improvements @FAPI
  2. Taxonomy terms are now associated with node revisions, not just nodes
  3. New module_load_include() and module_load_all_includes() functions for developers
  4. New hook_theme() registry @theme
  5. template_preprocess_* with .tpl.php files @theme
  6. file_check_upload() merged into file_save_upload()
  7. Node previews and adding form fields to the node form @FAPI
  8. JavaScript behaviors: new approach to attaching behaviors @js
  9. Upgraded to jQuery 1.2.3 @js
  10. Removed several functions from drupal.js @js
  11. Add views support
  12. file_save_upload() now passes all files through file_munge_filename(), so in order to upload a .zip (for example) file, that extension will need to be on the list of allowed extensions in the general file settings.
  13. Add a RSS feed icon to bottom of project_release_by_project view.
  14. Add project and project-release classes to the node edit forms [REGRESSION] [Fixed by patch in comment 11]
  15. notice: Undefined property: stdClass::$rebuild in /Applications/MAMP/htdocs/port/drupal/sites/all/modules/project/release/project_release.module on line 727.
  16. notice: Undefined property: stdClass::$file_path in /Applications/MAMP/htdocs/port/drupal/sites/all/modules/project/release/project_release.module on line 748.
  17. notice: Undefined property: stdClass::$file_date in /Applications/MAMP/htdocs/port/drupal/sites/all/modules/project/release/project_release.module on line 749.
  18. notice: Undefined property: stdClass::$file_hash in /Applications/MAMP/htdocs/port/drupal/sites/all/modules/project/release/project_release.module on line 749.

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.

aclight’s picture

FileSize
252.26 KB

A few minor changes of the views.

aclight’s picture

FileSize
255.13 KB

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.

hass’s picture

Subscribe

bdragon’s picture

FileSize
239.83 KB

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.)

aclight’s picture

Assigned: Unassigned » aclight

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.

aclight’s picture

FileSize
303.23 KB

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.

aclight’s picture

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.

hass’s picture

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

aclight’s picture

@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.

hass’s picture

Hopefully you are not only wasting your time.

chx’s picture

@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.

dam’s picture

Title: Upgrade to 6.x » it's a mess

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.

VM’s picture

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.

dam’s picture

Title: it's a mess » Upgrade to 6.x

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

aclight’s picture

Title: Upgrade to 6.x » Upgrade project module to 6.x

changing title

hass’s picture

Patch attached changes "release/project_release.js" functions to be included with Drupal.behaviors and no more doc.ready logic. Untested, needs review.

hass’s picture

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.

aclight’s picture

@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

hass’s picture

#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.

aclight’s picture

@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.

hass’s picture

FrankT’s picture

Could you provide a drupal 6 branch of the project, it would allow more people to install and test the module?

Thanks

aclight’s picture

@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 .
japanitrat’s picture

subscribe

hillaryneaf’s picture

subscribe

emilyf’s picture

Status: Needs work » Active

subscribing

hass’s picture

Status: Active » Needs work
japanitrat’s picture

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

fuzzy_texan’s picture

Subscribing

TotalMeltdown’s picture

Subscribing

0xAFFE’s picture

@japanitrat
I can confirm this.

silviogutierrez’s picture

@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

aclight’s picture

@#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.

Flying Drupalist’s picture

subscribe

sam6’s picture

Subscribing

SuperContraXTC’s picture

Status: Needs review » Needs work

sub

dazmcg’s picture

sub

MatthijsG’s picture

Subscribing

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
81.89 KB

I sat down and took a crack at fixing the views integration. This patch makes the default project type listing view sort of work, but it still has views reported problems and the project/% view does not work at all. I am attaching a diff against aclight's private SVN repository. Because files needed to be moved around, the patch does not really show of the real changes:

- required by Views post 2.0 RC2: added project_views_api() which is required by Views post 2.0RC2.
- required by Views post 2.0 RC2: specify views include, handler and plugin files to reside in ./views
- required by Views post 2.0 RC2: moved the project.views.inc and project.default_views.inc files to there as required by views
- required by Views post 2.0 RC2: broken out all the classes of handler and plugins as to their own individual files
- required by Views post 2.0 RC2: added project_views_handlers() to specify the handlers implemented and their parents for inclusion

Well, all changes were required by Views 2.0 post RC2, so these are not really up for debate, they are mandated. This still only makes the module sort of work. I'd love to work together with aclight or whoever is still working on this module port to find out the remaining issues to make this work again and bring forward from there.

To make collaboration work, I'd sincerely suggest that we move the code to cvs.drupal.org. Maintaining a remote fork of the module where changes to the 5.x branch are not applied and who knows who tracks when it was forked and so on does not foster collaborative work. Even setting up an entirely new project under the name project_drupal6 or something would be better then doing a remotely hosted fork. A locally hosted fork would at least allow for looking at CVS line level annotation to figure out why certain things are implemented as they are and how different parts are related. Also, it would allow to escalate issues from one project to another for forward and backporting as well as using multiple issues instead of this one issue for more then a year for what is a substantial work.

I'd like to collaborate with you all and get even more people in to help. We'd like to kick ass with the new drupal.org right? I think we can only do it with software brought up to date, not wasting our resources on obsolete code.

Summit’s picture

Status: Needs work » Needs review

Subscribing,
greetings,
Martijn

Ryanbach’s picture

Someone needs to make a 6.x-dev branch <-- Hint, hint.

Uhu’s picture

When can we get the first D6 release of the Project Module???

TotalMeltdown’s picture

Is there an authoritative, up-to-date source online for the status of this port? If not, can there be, so that we can have an understanding of what still needs to be done for a release?

aclight’s picture

The authoritative, up to date source for status on this port is what has been checked into the Subversion repository I have been using for the port. See comment #32 above.

There is not a list of things that need to be done still, unfortunately.

Once my code is committed to cvs.drupal.org then that will be the authoritative source on what has been done.

beginner’s picture

So, has patch #48 been committed to the SVN repository?

Ryanbach’s picture

No... not to the drupal one...

beginner’s picture

Patch #48 was "against aclight's private SVN repository" which also claims to be the authoritative one. Has it been checked in there?
Are people simply wasting their time working on this issue?

I guess only Dereck could unblock things by creating a D6 branch and committing there the code that already exists for D6.

aclight’s picture

@beginner: No, gabor's patch has not been committed to my private svn repository.

Let me explain the situation a little here:

There are still some things that we'd like to get fixed in the Drupal 5.x branch of the project and project issue modules before we branch for Drupal 6. See http://groups.drupal.org/node/10865 and http://groups.drupal.org/node/16069. One big issue that affects all of project* land is #98278: project* namespace bugs in $node. The project* maintainers have agreed that it would be best to fix this problem *before* branching, because if we try to fix it during the port that will make testing the port even more difficult than it will be.

Creating a D6 branch itself will not really unblock things. Hunmonk or I could also do that ourselves. However, the ported code that is currently in my SVN repository contains a *lot* of changes, and all of us agree that those changes should not just blindly be checked into the project cvs repository without at least some review.

Yes, we all realize that this is a non-ideal situation, and that the port is moving much slower than anyone of us would like. The best way anyone could help move the port forward would be by helping to write or review patches for any issue not yet finished in the list of things to do before the next 5.x release. Mostly, that means reviewing the $node namespace patches in the issue I linked to above. The unfortunate part of this issue is that it is huge, but really boring. And none of the sites run by the project* maintainers use a combination of modules that actually causes this bug to reveal itself. But at the same time, we realize that lots of project* users *do* use such a combination of modules (eg. they use pathauto with project), and so we need to fix this bug soon.

Brigadier’s picture

subscribing

hbfkf’s picture

subscribing

Gábor Hojtsy’s picture

Issue tags: +drupal.org upgrade
dww’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: aclight » dww
Priority: Normal » Critical
Status: Needs review » Active

A) I resolved all the conflicts between aclight's SVN repo and HEAD of CVS, and committed that into HEAD: http://drupal.org/node/157694

B) All the Views-related code and effort can now be found in #76726: Refactor project module to use Views [meta issue]. I took Gabor's patch from #48, fixed some things and committed to HEAD.

C) I've created a 6.x-1.x-dev release node. It's still very broken in many ways, but it's there if people want to help testing, and so we have that version in the issue queue now.

As I mentioned in the release notes, everyone interested in this port (all of you who "subscribed") should contribute to the chipin over at Drupal.org redesign code sprints -- donate now. ;)

Josh Waihi’s picture

Recently, I have the need to use the project module for D6 for a clients website. So I am very keen to see the D6 port complete.

Subscribing and working on CVS HEAD to help get this ball rolling

EkaMei’s picture

subscribing

dww’s picture

Status: Active » Closed (fixed)

Huge thanks to aclight (again) for getting the port this far. However, at this point, this issue has outlived its usefulness. Anyone interested in the port should watch issues in this queue associated with the 6.x-1.x-dev version:

http://drupal.org/project/issues/project?versions=357811

From here on out, I'd much rather deal with individual issues for each thing that needs to be done. Those who wish to "subscribe" to this port should do themselves and everyone else a favor by subscribing to the RSS feed of 6.x-1.x-dev issues:

feed://drupal.org/project/issues/rss?projects=3281&versions=357811&states=1,16,8,13,14,15,2,4