Is there a need for this module in 4.7, or is it being discontinued?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

javanaut’s picture

I've been too busy lately to keep up with the node-to-node relationship APIs that have been discussed or participate in the discussions. From what I've seen, the basic node relationship functionality will be abstracted to a core API, but the extended features like relationship rules and query engine will not be part of the core API. Those should still warrant a separate module.

I'm open to suggestions from anyone who's been paying more attention lately.

bomarmonk’s picture

FileSize
76.22 KB

This is just me (non-coder) hammering out the form API's with the form updating module and replacing some other calls that have changed for 4.7.. This copy won't work, but if it will help resurrect a module that offers this functionality, that's good

darius’s picture

I am almost done (will probably finish tomorrow) with an upgrade of Node Relativity to the new Forms API and Drupal 4.7. This module suits my needs and I intend to keep using it in Drupal 4.7. Once the new Relationship API debate settles down and something concrete show up, we can probably split the Relativity module into UI and API components. But for now, we should keep it alive.

Darius

darius’s picture

Title: Fix for 4.7 » Upgrade to 4.7
Category: bug » task
Priority: Critical » Normal
Status: Active » Reviewed & tested by the community
FileSize
74.99 KB

OK, here it is! I updated most of the relativity.module to the new Forms API, and cleaned some code. As far as I know, everything works except stuff related to 'Node Relativity Query' content type. I don't use it, it is left untouched for now. If there is interest in that functionality for 4.7, let me know.

bomarmonk, thanks for the Form API conversion, it was quite useful.

javanaut, could you start a new branch in CVS, please?

Darius

robertDouglass’s picture

Status: Reviewed & tested by the community » Needs work

+1 for new CVS branch.

Thanks for the 4.7 porting. I don't think the issue can really be marked ready to commit as long as there are non-existent functions in the module (form_select and so forth).

jasonwhat’s picture

Between CCK and other stuff I can't get a grasp on what the relationship plans are for drupal, but this module is pretty complete and might be something worth looking into working with relativity (http://drupal.org/node/40611). Maybe use the schema and api from the relationship module but use relativity for the "create new" and "attach" functions as well as query to interface.

darius’s picture

Status: Needs work » Needs review
FileSize
77.05 KB

OK, here is the full upgrade to 4.7. As far as I tested, everything seems to work, and no old form API call remain. Can we open a 4.7 branch, please?

Darius

darius’s picture

FileSize
77.82 KB

Missed a couple of more old forms. Updated version attached.

darius’s picture

FileSize
76.95 KB

A few more fixes.

javanaut’s picture

Darius, I'm way too overloaded to properly maintain this module. You seem to have both interest in, knowledge of and experience with it. Would you like to be the official maintainer?

darius’s picture

I can certainly maintain the module (updates, patches), but probably not develop it. Therefore, it might be better if some of the more seasoned developers or someone with future ideas and plans show some interest. If not, I can keep it alive for now, sure.

Darius

robertDouglass’s picture

This module was discussed in Vancouver at the meeting for the relationships API. Hopefully some more people will show interest. I'm certainly interested, though I too am reticent to step forward and become the official maintainer.

toemaz’s picture

Just to let you know I am using your 4.7 version.
I will come soon with some minor bug patches.

Darius, thx for taking time to upgrade this fine module!
(I wont wait for the API, so I will use this module)

KarenS’s picture

I'm finding this very useful. I have a very small change to suggest. In its current form, you can see a link to a node you do not have permission to view. This could be a problem if the name of the link includes information that is not supposed to be visible to anyone without the right permissions. The following change fixes that (at least in the places I have checked):

Around line 1673 of the latest version, change

if ($parent_node->type == $type) {

to

if ($parent_node->type == $type and user_access('view '. $parent_node->type)) {

and around line 1699 change

if ($child_node->type == $type) {

to

if ($child_node->type == $type and user_access('view '. $child_node->type)) {

This is a useful module. Hope someone will be able to keep it going. Unfortunately, I don't have time to offer to do so right now.

robertDouglass’s picture

@KarenS please make a new issue for your suggestion. The title would be "enforce node access permissions in links" or something like that. This current issue is about porting Relativity to 4.7 and if your suggestion only exists here, it is sure to get lost forever.

KarenS’s picture

I put the suggestion here because it applies to the uncommitted 4.7 module in this thread. I have no idea whether or not the fix will work or even applies to the committed 4.6 module.

KarenS’s picture

I might be interested in taking over the 4.7 path for this module. I need this functionality and have some ideas for other changes like integrating it into views, making it work with events as a simple way of tracking event attendance, adding in the ability to link to users as well as nodes, adding in an option to show related nodes on a separate tab, etc. Not sure if any of those ideas will work or not, but I'd like to take a stab at it. I'm not using 4.6 so won't be making any changes to that branch.

KarenS’s picture

FileSize
150 KB

Attached is a patch that adds in all the changes in this thread made by bomarmonk and darius, plus the small change I made to check user_access before displaying the link. I also made a change to move the node edit tab info from nodeapi form pre to form_alter to conform with the new forms api and because the relativity operations were not showing up on the edit tab without that change.

If it looks ok, maybe we can commit it to cvs to get the ball rolling on a 4.7 update. It still needs more work but is functional. Still missing node relativity query. I took a look to see if I could get that updated but I can't quite figure out how what it's supposed to be doing. If anyone could explain how it *should* be working I can try to clean that part up, too.

KarenS’s picture

FileSize
149.94 KB

Found that the previous patch handled relativity activities on the edit tab just fine but interfered with other form elements. This one works better.

darius’s picture

Status: Needs review » Fixed

OK, it's time to finally close this thread...

I checked in the 4.7 version into CVS. The tar.gz file should be generated automatically within 24hrs (if you don't use CVS directly). KarenS, please file *separate* issues/patches against the CVS version for the two issues you were addressing here. Thanks.

The node relativity query definitely worked at some point between my update of Node Relativity and the current Drupal RC. I will look into this, but feel free to file an issue or work out a patch on your own.

Thank you,

Darius

Anonymous’s picture

Status: Fixed » Closed (fixed)