Posted by pyutaros on May 15, 2007 at 3:28am
| Project: | Family Tree |
| Version: | master |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
If the maintainer doesn't have time, would they mind if I request someone else port it?
Comments
#1
No, so far as I know all the other developers have given up on this, so go for it: if you know of someone who wants to take it on. It's not really much of a module, though, nothing's ever really been done with it. Sorry.
#2
Thanks for the reply Sam. I wouldn't mind taking a stab at porting it to 5.x myself, as I feel that's the next logical step in my Drupal evolution. Do you know where I might start to see what's needed to get it ported to 5.x? Are there any good handbook pages for this? When you say it's not much of a module, what features does it currently have. It mentions being able to import gedcom files. That's a good starting point IMO. I'm probably interested enough to try and take this over as a pet project to learn by coding extra features. Thanks again for your reply.
#3
I'm not sure how much time I can commit but I'm also interested in working to get some native-Drupal GED-compatible functionality, including hopefully integration with the Timeline and Image modules, and some sort of "tree view". So count me as supporting the effort of getting something working with current Drupal. I'll download the existing code and get it working with 5.x when I have some time.
#4
pyutaros, how about Converting 4.7.x modules to 5.x and Converting 4.7.x themes to 5.x? I know the second one is for themes, but it may prove useful, as well as the first one. There's also the coder module, which helps pin-point some of the fixes.
#5
Thanks for the links oadaeh. Now that I've got some time on my hands again. I may pick this back up again.
#6
Well, I added a family.info file to the module's directory. I checked the code against the coder module for an upgrade with no objections. So all I need to do now is commit it so others can download. I suppose the thing to do is to create a patch, but since all I did was create a .info file, I will just upload that and recommend you download it to the family module's directory. As for what the module does at this point, see the module maintainer's comments on this. I'm going to look this module over in the next few weeks and see where I might go with it. I will notate progress by creating new issues as if I make any changes.
#7
#8
I created a .install file from the family.mysql included in the Nov 2006 -HEAD. Caveat downloader; it's been a while since I looked at this file.
#9
That was quick. Here's a version that actually works...
#10
Here is a patch against the November 2006 -HEAD that works under (at least) Drupal 5.2. I successfully imported 53 people from .ged file.
Next major needs:
Relationships - viewing, editing, etc
Views - family tree view, ascendency graph, etc.
#11
Hey pfolk. Thanks for your work. I will download the patch and install sometime today. I'm assuming I should first wipe what I've been mucking with, install HEAD, and apply the patch. Also, I'm very interested in getting my hands dirty with coding and testing, so I would like to volunteer to help you maintain this module. I am not an experienced coder by any means, but I am also not a complete stranger to PHP. I also would like to take my experience with this module and try and apply it to developing a MySpace crossposter module. Anyhow, please let me know if you are interested in receiving help or delegating tasks my way. I will do as much as I can to my ability and with as much time as I can spare. Just keep in mind that there may be a steep learning curve and a lot of stupid questions at first.
Thanks,
Jonathan
#12
Yes pyutaros, the steps you outlined should work---if they don't then my patch needs to be fixed =)
After playing with the module last night I see a couple major issues with it:
1) Editing family_individual nodes doesn't work. the family_individual_form hook in individual.inc doesn't appear to be getting called, thought individual.inc is being included.
2) When uploading a GED file, currently it wipes the GED-related tables, but does not delete the relevant node data from {node} and {node_revisions}. That leaves orphan nodes without a module to handle them nor entries in the table that would let the family module handle them!
3) Ditto when you uninstall the module. I haven't found a document saying that it's proper to delete node content on uninstallation, but it seems like that makes sense in this case, at least during development.
4) The relationships aren't showing up when you view a family_individual node. That looks to me like another hook that's not happening.
These hook problems are above my pay grade =) I'll enlist a more drupal and php-savvy developer to look into them, unless one of you figures it out first. Please comment on 2 and 3.
Peter
#13
NOW we're getting somewhere.
This patch against the November 2006 HEAD fixes editing an individual and viewing an individual (which shows all of their immediate relationships to other individuals). At this point, I consider the patched module usable for barebones viewing of GED content in drupal. Since you can't export I don't recommend you edit much, but editing facts about individuals seems to work.
Remaining bugs:
1) Debug handling of big GED files (could be a Drupal or PHP upload limit)
2) Do we delete nodes when we uninstall, or replace this content with a new GED?
Features necessary before my itch will be officially "scratched":
1) Allow editing, adding, and removing relationships
2) GED export (and import merge if it's not too hard---seems like there must be third-party tools for that)
3) Make view.inc more theme-friendly
4) Generate pretty graphs of ascendency and descendency. Allow specification of: relationships to follow and distance to traverse up and down the tree
5) Link users to individuals
6) Create permission to allow users to only edit themselves
7) Use Timeline module to plot various events for a set of individuals (specified as [individual,distance up, distance down] as with trees?)
Peter
#14
Okay. I'm going to have to stop for the night. Here's my experience so far with HEAD and the patch.
Correct Individual Name <== this displays correctly
Unknown Unknown
* Father: Unknown Unknown
* Mother: Unknown Unknown
Spouse:
Unknown Unknown
* Father: Unknown Unknown
* Mother: Unknown Unknown
Children of Unknown Unknown and Unknown Unknown:
Last Name First Name Sex Birth Date Birth Place Death Date Death Place
Unknown Unknown
I thought this might have been related to my .ged file, so I tried three different things. First, I uploaded my live .ged file from phpGedView by accident. Then I tried exporting and removing the pguv tags. (Proprietary phpGedView tags) Finally I tried exporting and changing the format from UTF-8 to ANSI. None worked. I will send you my .ged file for testing if you like.
I'll make a second post to address your comments from above.
Thanks,
Jonathan
#15
I forgot to upload my patch anyway. Speaking of which, should I start patching the directory rather than individual files if I make changes? Here are my thoughts on your comments, hopefully in bold:
1) Editing family_individual nodes doesn't work. the family_individual_form hook in individual.inc doesn't appear to be getting called, thought individual.inc is being included.
I believe you fixed this with the latest patch. I can go into individual records and change unknown to the right info. The interesting thing is that the relationships seem preserved. (i.e, when I edit my record, there are the right number of members in my family.)
2) When uploading a GED file, currently it wipes the GED-related tables, but does not delete the relevant node data from {node} and {node_revisions}. That leaves orphan nodes without a module to handle them nor entries in the table that would let the family module handle them!
My thoughts on the import side of this are twofold. If you're wiping records, you should wipe the nodes rather than leave them orphaned. However, maybe the import shouldn't wipe records at all and instead should create a new taxonomy term. In other words, my gedview program allows me to work with multiple ged files, maybe we could accomplish this by creating taxonomy heirarchies much like the forum module does. (i.e. jonathan.ged would create a term of Jonathan under the families vocabulary)
3) Ditto when you uninstall the module. I haven't found a document saying that it's proper to delete node content on uninstallation, but it seems like that makes sense in this case, at least during development.
For now, I say delete nodes. Not certain in the long run. There have been many modules where I have been glad that they left the nodes after uninstalling.
4) The relationships aren't showing up when you view a family_individual node. That looks to me like another hook that's not happening.
I guess this is fixed with the latest patch?
Remaining bugs:
1) Debug handling of big GED files (could be a Drupal or PHP upload limit)
I've experienced this kind of problem with image_import and acidfree modules. It may just be my hosting service (Dreamhost). I don't experience major problems on large audio imports. I might look into what they're doing to see if they found a creative solution for this problem. I've heard that some of this will be cured with a batch process implementation in Drupal 6.
Features necessary before my itch will be officially "scratched":
1) Allow editing, adding, and removing relationships
I'd be interested in helping however I can
2) GED export (and import merge if it's not too hard---seems like there must be third-party tools for that)
3) Make view.inc more theme-friendly
4) Generate pretty graphs of ascendency and descendency. Allow specification of: relationships to follow and distance to traverse up and down the tree
Check out the reports module? I don't think Views can accomplish the standard ged charts and graphs.
5) Link users to individuals
Glad to see this as a proposed feature.
6) Create permission to allow users to only edit themselves
Standard is normally user plus 2 relations in any direction. Maybe 1.
7) Use Timeline module to plot various events for a set of individuals (specified as [individual,distance up, distance down] as with trees?)
I was thinking about trying to tie in with Event module
#16
Pyutaros,
RE your first response:
I think that most of your problems (1,2,3,6,7) are due to not fully removing the previous version of the module. Why don't you uninstall the module, remove all your family_indivual nodes and node_revisions, and try installing from my patch again?
I don't think the changes in your patch are a good idea: {foo} in db_query adds the db_prefix and handles mysql vs postgresql etc syntax differences, so you want to keep that. I had semicolons previously but they seemed to be causing a problem.
I'm not experienced with drupal conventions enough to respond coherently to your issues 4 and 5 (admin category and exit link). If it's doing something unconventional, I do think we should fix that.
RE your second response:
I did fix the editing functionality, and the fact that it wasn't showing relationships (it was a problem with hook_node_info iirc). I think the Unknown entries are due to you not clearing the database before importing.
I like the idea of using taxonomy to deal with separate GED spaces, but I'd need to try implementing it to see if it would actually work.
I'll work on having it remove the appropriate nodes and node_revisions when you uninstall the module.
Remaining bugs:
1) Debug handling of big GED files (could be a Drupal or PHP upload limit)
2) Should give the option of removing all family_* nodes when you uninstall
3) Should inform the user that importing will delete all existing data (for now)
4) Should remove nodes of any individuals it removes upon import.
Features requested (in order of importance to me =):
1) Generate pretty graphs of ascendency and descendency. -- I'll look into implementing this with reports. I've asked the author of http://w3future.com/html/orgcharts.html whether I can incorporate his code to support this feature.
2) Allow editing, adding, and removing relationships
3) GED export (and import merge if it's not too hard---seems like there must be third-party tools for that)
4) Make view.inc more theme-friendly
5) Link users to individuals
6) Create permission to allow users to edit anyone, themselves, direct relations, and indirect relations
7) Create permission to allow users to view anyone, themselves, direct relations, and indirect relations
8) Allow GED "namespaces" using Taxonomy?
9) Use Timeline module to plot various events for a set of individuals (specified as [individual,distance up, distance down] as with trees?)
10) Tie in with Event module (details? I'm not really familiar with Event)
I'll try to tackle the bugs today.
Peter
#17
I see now why you referred me to the Reports module--one feature of it is supposed to be showing graphs of datasets, but that's a different meaning of the word "graph" =)
When I said "graphs" I meant nodes-connected-by-edges (the Computer Science "graph" concept), as opposed to "histogram", which is what they mean in Reports. That said, it might be cool to add node-and-edges representations of linked data to the Reports module...
Peter
#18
Just a quick update. I did try uninstalling and reinstalling as directed.
1) I deleted all family_individual nodes (there were no family_location)
2) I disabled the module.
3) I ran the uninstall.
4) I checked my database to ensure table removal. (There were no entries pertaining to family in node_revisions)
5) I deleted the module directory.
6) I extracted HEAD tar. <== sounds gross
7) I applied family_0.patch.
8) Enabled the module. (tables were created, my patch was in fact unnecessary though it worked either way for me.)
9) Received errors when importing. Also noticed that Access permissions were kept from previous install. Nodes still display as shown in item 7 of post #14
I'm thinking I may try uninstalling again tomorrow and seeing if your original patch enables me to import correctly. Perhaps the second patch unintentionally broke that functionality. I can also send you my ged file if you would like. I will also try tackling the minor issues I said I would now that you gave the go ahead. (i.e. admin groups and other small stuff.)
Also, here's a description of Event from the module's main page. Many people use gedview sites to keep up on anniversaries, remembering death dates. All of these could be EVENTS on the calendar.
Thanks for your work,
Jonathan
#19
Yep. Either something in your second patch breaks the import, or they needed to be applied sequentially. I applied the first patch and imported records with no problem. Obviously I am having the issues with the relationships. I will see about uninstalling, removing all data, applying patches sequentially, then importing.
#20
Here is the patch that puts Family's admin settings into standard Drupal categories. Import is now under Content Management. Auto Privacy is now under Site Configuration. You may have to disable and reenable the module to have this take effect once patched.
#21
No big surprise. the patch I wrote breaks the functionality of the admin settings. I know the fix. I will resubmit the patch after I have done a step by step application of your patches to find out what breaks import.
#22
Results of testing.
Untarred HEAD.
Applied family.patch.
Enabled module.
First upload successful.
Reupload successful.
Deleted all records.
Disabled module.
Applied patch only to individual.inc. (Skipped all other hunks)
Import fails.
user warning: Duplicate entry '19453' for key 1 query: INSERT INTO family_facts (fid, nid, xref, fact_code, fact_value, gedcom_source) VALUES (19453, 3151, 'I1', 'INDI', '', '0 @I1@ INDI\r\n') in /path/to/my/drupal/root/includes/database.mysql.inc on line 172.
Line 172 is just an error check trigger. It seems that somehow the changes you made are causing duplicate values for the FID which is the fact table's primary key. I think it may have less to do with your specific changes and more to do with how import.inc creates nodes when the fact_code = INDI. Can't remember the line number in import.inc where this happens, but I'm sure you'll find it.
Created patch for admin settings from family_0.patch directories. Realized I can't test to see if import works under second patch. Got very sleepy. Will rewrite the patch again tomorrow from your original family.patch.
#23
Okay here it is finally. I created a patch for the admin settings off of family.patch. Here's what it does:
Easy peasy stuff really. In theory, this patch should work with either version of the family patches. I'm not sure if the errors I got patching from family_0.patch were my fault or not. Either way, it's tested and ready. Now we just need to figure out what broke import in family_0.patch.
Thanks,
Jonathan
#24
I actually did this work a two weeks ago, but lost the long comment explaining it.
Attached please find a new patch for the Family Tree module v5.
Fixed bugs and changes:
Importing received the biggest update. I successfully imported 26000 facts about 2800 individuals from one monster GED file I have. The way you import large files is:
To Do
I don't know of any outstanding bugs.
Features requested (in order of importance to me =):
#25
Thanks for the update and new patch! I'll try it out when I have a chance. I decided that my PHP knowledge was slightly deficient, so rather than blindly flailing at the code in the Family module, I decided to RTFM at php.net. It's amazing how much one can learn this way. Anyhow, I feel a little better about where I stand now, and may try and take on a couple of the issues on your to do list as I have time. Likely I'll try working on integration with Event and Taxonomy. I'll let you know once I start by creating new issues in the queue. Should one of us apply for CVS and module ownership so we can commit our changes?
Thanks,
Jonathan
#26
Yes, Ring TFM is always humbling but empowering.
I'd recommend you start with Event functionality. I think you'll get good results without too much effort. I suspect that the Taxonomy thing will be quite hard, but go for it! I'm going to tackle the pedigree, etc, diagrams next.
I think someone needs to commit this stuff, but I don't know the process. Having CVS commit ability would help for us both to coordinate our development, but I don't really want to be responsible for the module on an ongoing basis...not sure where that leaves that.
Peter
#27
Well, I' have plans for another module in the future, so having CVS is good for me either way. I think I need to open an issue somewhere other than here. What I'll do is request CVS for both of us, I'll submit your most recent patch (a working version is a requirement), and I'll name myself as maintainer. That way, when you've scratched your itch, you won't be responsible for maintenance, which might be more up my alley anyways. I'll probably get to all of this tomorrow or Wednesday.
Thanks,
Jonathan
#28
I tried to give you both (pfolk & pyutaros ) CVS access, but neither of you have CVS accounts. If you apply for accounts I can add you. :-)
Sorry, by the way, for not taking any notice of this project for the last year or so. I don't intend to now, I have to admit: I've moved on from the annoying-ness of Drupal to the lovely world of CakePHP! (And for family history stuff, I'm using MediaWiki, by the way.)
#29
My CVS account was created yesterday, should be under 'pfolk'.
#30
CVS accounts approved and I have added you both to the project.
#31
TYVM
#32
I think I just created a new branch for Drupal-5 in CVS. Hard to tell as I hear it takes while for that branch to become available for browsing. I'm admittedly having some difficulty learning CVS, but WinCVS seems simple enough. PFOLK, I'm going to have to hit you up via e-mail about the import. I'm no longer getting errors, but I appear to still be having problems with my relationship database. I'll probably shoot you a message with the details sometime this week.
Thanks,
Jonathan
#33
CVS has been granted and module ported to 5.x.
#34
Automatically closed -- issue fixed for two weeks with no activity.