I couldn't find a specific issue regarding porting to Drupal 5 so I'm starting a new one. I did find a few straddlers about various D5 related tasks. I'll go through and mark them dup when I attach a patch to this issue. Just making this issue as a heads up for anyone else thinking of doing this.

Comments

dww’s picture

Version: 4.7.x-2.x-dev » 5.x-2.x-dev

i just committed http://drupal.org/cvs?commit=48364

merging DRUPAL-4-7--2 branch as tagged at DRUPAL-4-7--2-1 into HEAD:
Bugs: #97944, #78595, #61453, #85788, #82619
Features: #96971, #102255

please use HEAD, not DRUPAL-4-7--2.

thanks!
-derek

AjK’s picture

OK, ran into a problem. Basically, while doing this, I "test as I go" to make sure each bit does what I expect it to. When it came to submitting an issue, the "select a project" select box was empty (no projects). I remember from actually doing projects on d.o that you have to enable the issue tracker for your project. So off I went to find the part where that's done so I could switch it on for my test projects. That's when it started to get real messy!

I expected project_issue to hook into project's project edit form via hook_form_alter(). Nope, project_issue doesn't implement the hook. So, I then guessed well maybe project actively looks for project_issue being installed. And it appears that's how it worked in some fashion. So I started to follow through the port I did for project. And that's where I ran into a tough one. Initially, I couldn't find it. So I went back to d.o to look at some project pages to give me to fixed text to search the code on (form element titles). That's when I see, to my horror, project now "tabs" the edit page, "project", "issues" and "releases". Bummer, my port is void of this completely. So I suspect my port of project is duff. I had thought dww had merged 4-7--2 to head, seems I was wrong and he only just did it (my port of project I did last night was against head).

So I reach the end of my session on this port basically with a half broken project_issue module and what appears to be a duff project port too :(

dww’s picture

Assigned: AjK » dww
Priority: Normal » Critical

FYI: i started this port, and ended up committing http://drupal.org/node/78621 and http://drupal.org/node/75595 already, since i needed to commit something to test another issue with the xcvs-scripts (http://drupal.org/node/104217) and those seemed like as good as any. ;) i've finally gotten the /admin/project block sorted out (http://drupal.org/node/101150#comment-168825) so that's where the project_issue settings page should go. i'll keep hacking on this for another hour or so, see how far i get, and post an initial patch.

dww’s picture

Status: Active » Needs work
StatusFileSize
new27.66 KB

it's far from done, but it's a lot of the way there. ;)
TODO:

  1. fix hook_view()
  2. finish conversion to new t() placeholders
  3. hook_menu() is still somewhat screwy for the /admin/project block. :( the two new items i added from here (project-issue-settings and project-issue-status) are showing up in the block, but also directly in the navigation mention under Administer. :( it's not $may_cache badness anymore, but i'm at a loss...
  4. converting $_POST['op'] to $form_values['op']
  5. finishing the drupal_get_form() and FAPI-pull conversion
  6. Change user_mail() to drupal_mail()

everything else from http://drupal.org/node/64279 is either done (links, hook_settings, hook_menu, lots of t(), $_POST['edit'], fixing the CSS, menu capitalization, etc, etc) or verified that they don't effect us here, and i made some decent progress on the FAPI-pull conversion already.

dww’s picture

StatusFileSize
new40.97 KB

finished:

  • hook_view()
  • hook_menu() [the problem was module weight, see project_issue_update_500()]
  • nearly all of the FAPI pull and drupal_get_form() stuff.
  • added a backwards compatibility menu item for "node/add/project_issue" (it's now officially "node/add/project-issue") so that the 100's of links in handbook pages, forums, emails, etc, etc, all would still work after the upgrade.

TODO:

  1. finish conversion to new t() placeholders
  2. converting $_POST['op'] to $form_values['op']
  3. finishing the drupal_get_form() and FAPI-pull conversion
    • issue follow-ups are broken
    • CSS on issue previews are broken
    • probably a few other minor FAPI bugs to flesh out...
  4. Change user_mail() to drupal_mail()
dww’s picture

Status: Needs work » Needs review
StatusFileSize
new57.56 KB

ok, this should be everything. needs review and testing, but so far, i've finished everything on http://drupal.org/node/64279 and all TODO items from previous comments. furthermore, i fixed some bugs in places that i think are broken in 4.7.x, too, but i'll backport those separately. also, this version has an even better backwards compatibility menu item for "node/add/project_issue" that understands 2 layers of args (project name or nid, and issue category (bug vs. feature, etc)). finished the conversion for t() placeholders, all FAPI stuff, preview bugs (turns out to be a bug in core http://drupal.org/node/104729), confirm_form() conversion, drupal_mail(), etc, etc.

dww’s picture

StatusFileSize
new57.33 KB

after committing #104484 to HEAD, the old patch didn't apply cleanly anymore.

dww’s picture

committed to HEAD and installed on s.d.o (to make it easier for others to test).
i'm still leaving this issue as "needs review", since i'd appreciate more reviews and testing...
thanks,
-derek

bdragon’s picture

StatusFileSize
new7.6 KB

mail.inc doesn't use the drupal_mail function properly... This is causing really odd issue emails.

Here's a !visually inspected only -- not yet tested! patch.

bdragon’s picture

StatusFileSize
new7.46 KB

Resaved patch in unix format at killes' request.

killes@www.drop.org’s picture

tested on s.c.o, seems to work. Applied locally to d.o..

dww’s picture

Status: Needs review » Fixed

it's obviously been working fine on d.o. reviewed carefully and committed to HEAD.

i'm going to give up on people reviewing these porting patches, so i'm going to mark them as fixed now.

Anonymous’s picture

Status: Fixed » Closed (fixed)