Closed (fixed)
Project:
Legal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Oct 2010 at 14:51 UTC
Updated:
27 Oct 2011 at 21:00 UTC
Jump to comment: Most recent file
There were some recent changes to the module in HEAD, so i'm wondering whether it's the right time to start a port of the legal module.
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | legal.zip | 21.76 KB | exratione |
| #20 | legal_d7_port.patch | 52.09 KB | quicksketch |
| #8 | legal.zip | 196.05 KB | RasputinJones |
Comments
Comment #1
robert castelo commentedNo, I'm making some extensive changes to Legal module at the moment, so please hold off starting a D7 port till November.
Comment #2
ddyrr commentedIs HEAD ready to start porting yet?
Comment #3
tom friedhof commentedAny updates on this? We ready to start the D7 port?
Comment #4
robert castelo commentedWe should clear out the issue queue before starting a port. Working on it.
Comment #5
avo_liao commentedsuscribe
Comment #6
eric-alexander schaefer commentedIs it november yet? ;-)
Subscribing.
Comment #7
l33tdawg commentedYou guys did mean November 2010 right :)
Comment #8
RasputinJones commentedThis works in general but there are a few bugs that I believe need to be fixed. There's one particularly nagging bug that I haven't been able to determine the root cause.
function legal_administration_validate($form, &$form_state)andfunction legal_administration_submit($form, &$form_state)do not seem to store the user submitted details in
$form_state['values']leading to all sorts of ugliness accessing the user submitted details using$form_state['complete form']blah. If anyone spots the root cause of the bug please fix and let me know why.Cheers.
Comment #9
l33tdawg commentedFix for legal.admin.inc
$version = legal_version($form_state['values']['version_handling'], $form_state['values']['language']);
and changed your db_insert portion so it's slightly easier to read:
db_insert('legal_conditions')
->fields(array(
'tc_id' => NULL,
'version' => $version['version'],
'revision' => $form_state['values']['revision_id'],
'language' => $form_state['values']['language'],
'conditions' => $form_state['complete form']['conditions']['#value'],
'date' => time(),
'extras' => serialize($form_state['complete form']['extras']['#value']),
'changes' => $form_state['complete form']['changes']['#value'],
))
->execute();
Comment #10
l33tdawg commentedStill loads of other bugs to squash though...
Comment #11
RasputinJones commentedThanks. File em and I'll fix the ones I can.
Comment #12
robbiew commentedsubscribe!
Comment #13
robert castelo commentedYou may have noticed I've been going through the issue queue, weekend by weekend, fixing bugs and adding features. A few more to go, and then I'll start on a Drupal 7 release.
Although the code will change, the data structure (database) will remain the same, and although patches won't apply, any work porting Legal to Drupal 7 will be useful, as I can look through the code as a reference.
Thanks for everyone's efforts!
Comment #14
mgregoire83 commentedSubscribe!
Comment #15
mxtSubscribing
Comment #16
fedbccer commentedSubscribe
Comment #17
modoq commentedsubscribe
Comment #18
scthomps312 commentedSubscribe
Comment #19
FrequenceBanane commentedsubscribe
Comment #20
quicksketchI've ported Legal module to Drupal 7, but this patch could be slimmed down quite a bit by making a few basic changes to the D6 version of the module:
In any case this patch seems to get Legal fully working in D7. I've also made a sandbox over in http://drupal.org/sandbox/quicksketch/1173602 to keep up with more changes/fixes to the D7 port, since with 6 months since the last commit to Legal module, I'm not very optimistic that this will make its way back into the official module any time soon.
Comment #21
quicksketchSorry that assumption was made based on the Legal project page, which for some reason lists the last commit at 26 weeks ago. The Git repo has obviously seen some action more recently than that: http://drupalcode.org/project/legal.git
In any case, at least the sandbox will make it easier to reroll.
Comment #22
BenK commentedSubscribing
Comment #23
FrequenceBanane commentedSo, we have to install d6 version and then upgrade even though we are on a fresh d7 website ?
Comment #24
quicksketchNo, just install the D7 version.
Comment #25
onsale555 commentedsubscribe!
Comment #26
FrequenceBanane commentedI may be noob, but where is the D7 version ? I can only see patches here, and there is no d7 version on this project's page (not even in "view all releases" section) ... so where can I find it ?
Comment #27
l33tdawg commentedGreat stuff quicksketch :)
Comment #28
robert castelo commentedHave cleaned up code format so it complies with coding standards, ran it through Coder set to Minor and only get one exception that I don't want to change (and commented why).
Released as 6.x-8.5, which includes a few other changes as well.
quicksketch would you have time to re-roll the patch to make it easier to see the changes for a D7 update?
Comment #29
quicksketchThat's great Robert! Yes I'd be happy to merge the changes and update the Git repo with the latest. Those code-style inconsistencies were driving me bonkers! I'll roll a patch and see how drastic the diff is and post here.
Comment #30
exratione commentedBecause I'm both nice and in a hurry, I'm attaching a functional D7 Legal port, based on what's been posted in this thread to date. It's based on 6.x-8.5, with the sandbox patch from http://drupal.org/sandbox/quicksketch/1173602 and fixes all the blocking issues I found with that.
Works for me on D7.4, no guarantee offered. Probably still bugs lurking in there.
Comment #31
quicksketchYeah I tried to merge with the existing 6.x branch but it's an absolute disaster. There are dozens and dozens of confusing conflicts and it's nearly impossible to tell what's useful and what's not. We need something stable to work off of, as my sandbox is now useless when it comes to merging with the existing 6.x branch with all the code-cleanup changes.
Comment #32
robert castelo commentedQuicksketch thanks for trying!
I'm taking a few days off and plan on porting Legal to Drupal 7 as a little holiday project, will look through your patch as part of the upgrade.
Comment #33
andypostsubscribe
Comment #34
andrew_mallis commentedsubscribe.
Comment #35
grota commentedsubscribe.
Comment #36
Stefan Haas commentedsubscribe.
Comment #37
lonehorseend commentedSubscribe
Comment #38
sitekick commentedNot sure if this is the right place for this, but I applied the patch in #20 and had the module running successfully in d7. I believe I tracked down a bug that started with a 'Notice: Undefined property: stdClass::$lc_id' message.
In legal.admin.inc part of the legal_versions_latest_get function is:
I changed the two instances above to ->fetchAllAssoc('tc_id') as this was the column name in the legal_conditions
Also in function legal_display_change... in legal.module
These changes resolved the notice, and all seems well.
Comment #39
renat commentedSubscribe
Comment #40
andypost@sitekick can you provide a patch?
Comment #41
robert castelo commentedPicked through Quicksketch's #20 patch by hand and updated the module, currently just a work in progress, as I haven't had time to test, and Simpletest returns many errors.
Ran out of time do any more work on it at the moment, will carry on next weekend.
Comment #42
robert castelo commentedDrupal 7 version now available!
Lots of bugs squashed this weekend.
I tested manually, and also updated and ran the automated tests, all features working as far as I could see.
Exception is the Views generated pages which report an error and don't display some of the data. Will need to fix that another day.
Thanks to RasputinJones, l33tdawg, quicksketch, exratione, and sitekick for code and encouragement.
Comment #43
quicksketchYAY Robert Castelo!! Thanks for all your work!
Comment #44
mxtThank you very much!!!!
Comment #46
sitekick commentedNice work.
Re #42 If I recall correctly, the errors on the view pages went away when I enabled the Locale module. And all data was present.
Re #40 Sorry I missed your post, not sure I could have provided a patch anyway. Need to read up on making patches and had modded the module pretty heavily to meet some specs.