Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Category: support » task

Yep, I plan on porting this module as soon as possible (once time is available). I shouldn't need D7's nodereference super-stable before the port, since this module is relatively simple. Any patches I'd be happy to review and make a D7 branch.

jphautin’s picture

Hello Nate,

Here is a first try of drupal 7 port.

It has been tested in the 'views gallery' usecase (see http://drupal.org/project/views_gallery) as I'm trying to make a Drupal 7 site with the same settings as this module.

Note that I have created two "TODO" in this patch you must check as there is some issue with referenceable types for now.

regards,

JasonMoreland’s picture

Any movement on the D7 branch. I really like this module. Pity it's not built into D7...

quicksketch’s picture

Any update will be posted here. Drupal 7 doesn't even include Node Reference at all (it's still in contrib).

quicksketch’s picture

Status: Active » Needs work

Hey jphautin, sorry it's been a while since I could look at this patch. I think we should consider a set of changes to the Drupal 6 version that make it more similar in code to the D7 port. As it is, there are segments of 100+ lines being moved around the module or indented without any other changes. From a maintenance and feature standpoint, it will making things much easier if we make the code as similar as possible between these two versions.

jphautin’s picture

Hello Nate,

You are the maintainer of this great module, so, please, do as you think it is better. If you think I could help, just ask ! :)

darrenmothersele’s picture

When trying to use this patch against HEAD I get "3 out of 8 hunks FAILED".

I noticed this issue was tagged version 1.3, but patch didn't work at all against that version.

scotwith1t’s picture

subscribe

benallfree’s picture

+1, tried this patch against 1.3 and it didn't work.

This seems like a really important update for D7, any way I can help? I don't have any experience patching for D7 yet...

aiwata55’s picture

subscribe

scotwith1t’s picture

Title: Drupal 7 port » Drupal 7 port for Nodereference URL Widget

Changing title just for clarity in our individual issue queues! Mine's full of generic "D7 port"s and updates and never know which one it is!

FiNeX’s picture

Subscribe

mr1’s picture

Subscribe

mthart’s picture

subscribe

AdrianB’s picture

Subscribing.

vitok-dupe’s picture

Subscribe

rorymadden’s picture

Subscribing.

Is this intended to work with the new References or Relation project?

quicksketch’s picture

Hi rorymadden, whichever solution is the defacto standard for Node References in Drupal 7 I'll support. I really like the idea of of References module (basically just a new location for the existing User and Node References modules) and I hope that it gets widespread acceptance.

kehan’s picture

subscribing

andypost’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

I think we should follow http://drupal.org/project/references module which works but relation only starting and have no converting from cck fields #987844: How can I collaborate with this module? #993386: Discussion thread about relation roadmap

jzornig’s picture

subscribing

AdrianC-1’s picture

Subscribing

ranavaibhav’s picture

Subscribe

vitok-dupe’s picture

So, when we see D7 version? It's one of my favorite modules! Give me this happy day! )))

jcarlson34’s picture

Subscribing

vitok-dupe’s picture

Priority: Normal » Major

When? When? When? =)

vitok-dupe’s picture

it's not fair! Lullabot talking about Views Gallery for D7 in this video but how it's can be possible in fact what Views Gallery depended on this module and Views Attach?

marcusx’s picture

+1 subscribing

willmoy’s picture

Issue tags: +D7 porting

Sub and tag

kepford’s picture

subscribing

kbond’s picture

subscribe

pmackay’s picture

subscribe

ntripcevich’s picture

subscribe

vitok-dupe’s picture

I'm tired of waiting and make it myself. Ladies and gentleman today I am proud to present to you my first php work ever and this results the port of Nodereference URL Widget to Drupal 7!
It's not perfect, but now it's works.

willmoy’s picture

Congrats! Good to see someone step up... will try to review at the weekend.

Jax’s picture

Since the proposed patch works with node reference, should we start a new project that works with References and yet another one to integration with Relation?

vitok-dupe’s picture

Patch works with node_reference part of the References project!

quicksketch’s picture

Status: Needs work » Needs review

Thanks vitok, I'll do my best to review this patch when I get the time and I'd be happy to include it in the nodereferenceI_url project. There are a few minor things (code style, rearrangement) that I'll probably include in the actual port but this is an excellent start.

Since the proposed patch works with node reference, should we start a new project that works with References and yet another one to integration with Relation?

Like vitok says, this port would work with References (the node_reference sub-module it includes). KarenS has indicated that References is the most likely way forward for node and user references while the Relation module is likely to take a different trajectory (sort of like the Relationships module before it).

This patch just needs a little code-style love and then I think it would be good to get started with it. I'm not certain about the removal of hook_elements() (which would be hook_element_info() in D7), but I'm guessing this had to do with consistency with the D7 version of Node Reference, which probably doesn't use custom elements any more either.

vitok-dupe’s picture

I'm not remove "nodereference_url_elements" I just move it to bottom and also rename it to "nodereference_url_element_info", at the bottom I'm collect all functions that i can't understand how it tested. In this path i think all functions after "nodereference_url_get_nid" function not work at all. Also I can't understand what is the purpose of the "nodereference_url_autocomplete_validate" in fact that for #element_validate of the autocomplete fallback form exist "node_reference_autocomplete_validate" function?

jhedstrom’s picture

The patch in #34 wasn't cleanly applying (typo in .info file). This is the same patch, re-rolled.

jhedstrom’s picture

Here's an updated patch. There was a typo in nodereference_url_node_view() ('nodereference_ur' instead of 'nodereference_url').

vitok-dupe’s picture

jhedstrom: There was a typo in nodereference_url_node_view() ('nodereference_ur' instead of 'nodereference_url').

Ooppss. :)

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Maybe it's time to make a dev branch to get more reviews? Last patch works fine

no2e’s picture

subscribing

kinesin’s picture

I couldn't get the nodereference_url.701670.patch and _0 variant to apply.

# modules/nodereference_url# patch -p0 < /d7/nodereference_url.701670_0.patch 
patching file b/nodereference_url.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file b/nodereference_url.info.rej
The next patch would delete the file a/nodereference_url.install,
which does not exist!  Assume -R? [n] n

Maybe I'm patching it wrong?

I found the nodereference_url_7.x-1.x-dev.patch applied with no issue to the nodereference_url-6.x-1.6.tar.gz
However following on the typo spot I manually fixed this on line 47 of the nodereference.module file, then enabled the module.

willmoy’s picture

I had the same, did the same. The latest patch has a weird a/ and b/ directories thing going on so I used the patch in #40 with the typo corrected by hand, which applies cleanly.

Spotted:
+ * Implements of hook_widget_info().
+ * Implements of hook_widget_info().
+ * Implements of hook_node_view().
... etc. (lose the 'of's)

still reviewing. Leaving at RTBC by now cos that can be cleared up easily if it's being committed.

willmoy’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
30.17 KB

New patch with:
- The 'ur' typo fixed (#41)
- 'Implements of' changed to 'Implements'
- The extra spaces taken out in: + if ( $link_settings[$view_mode] ) {
- README.txt and .info updated to take account of it no longer being a CCK module

Read the patch and tested and think it's functionally RTBC, but setting to NR so someone can double check my README changes.

Thanks to vitok.

spacereactor’s picture

subscribing

ore’s picture

I found a bug where if you are using callbacks on other fields by tapping in and altering the form on a
*_node_form_alter(&$form, &$form_state, $form_id){

and implementing a callback on a field such as

$form['field_leg_from']['und'][0]['nid']['#ajax'] = array(
      'callback' => 'spa_misc_leg_city_from_callback');

then everytime the form is processed or whatever it does the node ref url is trying to parse the url but the url has turned into a system url so fails and thus looses its value. I've added this code onto line 283 which grabs the value out of the form_state and dumps it back in for processing if it cant parse it in the url. seems to fix my bug, not sure of the consequences on other field types (autocomplete fall back etc, im using page not found)

line 285 nodereference_url.module

if(empty($referenced_nid)){
    	// check the form state for a value.
    	$referenced_nid = $form_state['values'][$field_name]['und'][0]['nid'];
    }

so the whole block of code should be from 281

// Pull from the URL.
  else {
    $referenced_nid = nodereference_url_get_nid($field_name);
    if(empty($referenced_nid)){
    	// check the form state for a value.
    	$referenced_nid = $form_state['values'][$field_name]['und'][0]['nid'];
    }
  }
Anticosti’s picture

Subscribing

stacyh’s picture

Hey guys, can someone help me out? I'm using D7 and applied the patches in the issue's. When I click on my node reference URL link I'm taken to my edit page of the new node and the node reference is filled in. However after I save the reference doesn't appear in the node, and when I go back to the edit screen it's like it was never selected in the first place. Any ideas?!?

I've attached the .info and .module (renamed with .txt so that it would post here)
Thanks for any help!

vitok-dupe’s picture

Status: Needs review » Closed (fixed)

strange... for me it's work... but you described the problem what I have before "value not save correctly" how you can get it now i can't understand, and i can't reproduce this.

vitok-dupe’s picture

Status: Closed (fixed) » Needs review

oops

stacyh’s picture

I started over and it seemed to work until I messed with the redirect options. Even when I switch it back to no redirect the problem is still there. Do my files look correct?

EDIT: actually after messing with the redirect. I made a new node, then tried to reference that one with another new node and it worked. But any node that was existing before I messed with the redirect options are still not able to be referenced correctly. I hope that helps?!?

vitok-dupe’s picture

I found this problem, and it's not in Nodereference URL Widget, problem in ajax requests other fields (file or image field)! They rebuild $element (main form) of nodereference_url here's why value is empty, cause it's rebuild form with wrong arguments, and use fallback where #default_value is NULL! For example:
arg(0) == 'file'
arg(1) == 'ajax'
arg(2) == 'field_gallary_image' (field name)
arg(3) == 'und'
arg(4) == '0'
arg(5) == 'form-GHyoFi31YRkazJYDrNi-2fZ9dBo51JrZ-gwIIn3XpBk'

I want to hear that quicksketch think about this.

vitok-dupe’s picture

I figured this out! Here's new fixed version.

vitok-dupe’s picture

Here's new version what work with non-clean urls.

vitok-dupe’s picture

I'm angry... redirect not work...

vitok-dupe’s picture

I did it, now it's work well.

hopewise’s picture

Can some please tell me how to apply the patch on the D6 version of Node Reference URL Widget ?
I am just new here, and I need a help please.

quicksketch’s picture

Can some please tell me how to apply the patch on the D6 version of Node Reference URL Widget ?

http://drupal.org/patch/apply, or http://lmgtfy.com/?q=Can+some+please+tell+me+how+to+apply+the+patch. :P

hopewise’s picture

in the patch file, I know I shall alter the following lines:

--- /home/vitok/public_html/drupal/sites/all/modules/nodereference_url/nodereference_url.info 2010-04-07 10:15:08.000000000 +0300

+++ /home/vitok/public_html/blog/sites/all/modules/nodereference_url/nodereference_url.info 2011-01-25 01:22:44.411338334 +0200

As for the --- line, what it should be ?
And as for the +++ line, what it should be ?

I am trying to use TortoiseSVN

Thank you

vitok-dupe’s picture

opps sorry, i forgot to remove "/home/vitok/public_html/*/sites/all/modules/nodereference_url/" here's clean patch.

Can some please tell me how to apply the patch on the D6 version of Node Reference URL Widget ?

I always do:

cd /path/to/drupal/installation             #or in this case nodereference_url module.
patch -Np0 -i /path/to/patch
hopewise’s picture

thank you, but where to go to inter the lines: ?

cd /path/to/drupal/installation
patch -Np0 -i /path/to/patch

hopewise’s picture

ok, I managed to patch the module with TortoiseSVN,
but, one question please,
I've noticed that the nodereference_url.install will be empty when I apply nodereference_url-7.x-1.0-dev.patch,

is this what you really want to do vitok ?? TortoiseSVN asks me if the nodereference_url.install shall be deleted ?

vitok-dupe’s picture

is this what you really want to do vitok ??

Yes I do! =)

hopewise’s picture

Thanks vitok : )

skov’s picture

Subscribe

amalaer’s picture

subscribing

WorldFallz’s picture

i'm going to be working with this on d7 in the near future-- any chance we can get a dev committed to make workflow a bit simpler?

vitok-dupe’s picture

+1 needed a dev branch

zatarain21’s picture

Thanks for the patch

Here instruction in detail to apply the path

1. Download Node Reference_URL 6.x.1.6
2. Uncompress
3. Download the last path posted nodereference_url-7.x-1.0-dev.patch
4. Copy the file inside of the directory "nodereference_url"
5. In a terminal (Linux) get into the directory cd /pathtothenodereference_url
6. Then in the terminal write:

patch -p0 < nodereference_url-7.x-1.0-dev.patch 

7. Cross your fingers : ) now you have a nodereference_url that could be install in drupal 7

quicksketch’s picture

I've branched HEAD for D7 use, however the current patch needs some work before I could commit it. Because I will likely be maintaining the D6 and D7 branch at the same time, the current patch needs to abstain from doing any unnecessary changes that are not directly related to the D7 functionality. Additionally we'll need a D6 patch of "backports" with any D7 patches, to maintain as much consistency as possible between the D6 and D7 version. I'm okay with updating all the D6 code to match D7 coding standards (things like spaces on both sides of periods and "Implements" instead of "Implementation of". The important thing is that the two versions are as similar as possible. If we don't take care of this now maintenance will be significantly more difficult in the future.

WorldFallz’s picture

thanks nate-- and everything you say makes perfect sense.

So, if I understand correctly--

1) straight upgrade to d7
2) bug fixes / features to d7 first with backports for d6

quicksketch’s picture

The way I usually approach this problem is this:

- Port the module entirely to Drupal 7 (like the current patch)
- Go through and "backport" all of the D7 changes that can be used for consistency to the D6 version (code formatting, indentation, function separation etc).
- Apply the D6 patch to the project.
- Branch the project for D7.
- Re-roll the patch so that it is much smaller since it's now just API changes.
- Apply the D7 patch to the project.

goldlilys’s picture

Subscribing

cartagena’s picture

Hi. I'm not quite sure I understand all the above but it seems somewhat related to what I am trying to do. I am using drupal 7 and trying to build group membership lists. I created my group content type that lists the name and location of the groups. Then I added a node reference field to my user profile (using the reference module) so that when a person requests a login they can choose the name fo the group to which they belong. All that works fine.

When I go to create my view, if I choose a node type for the view it won't display the users even with my relationship set. If I choose a user type (which I think is what I want) it won't display the node type so I can't include the names of the groups with members listed in each group. Any ideas? I'll be at drupalcon Chicago next month but I need this site done by mid-April and would like to figure it out before the conference. Thanks

goldlilys’s picture

For your project, in d6, what I usually use is this module, node reference and node referrer. But I'm also having a hard time finding the right modules for d7 that are equivalent to those modules.

References and relations modules are still being worked on for d7 and doesn't have stable versions yet. So I'm guessing, if you need to finish your project by April, it will probably be a good idea to use d6 in the meantime and make that work. Once d7 becomes more stable, then convert those sites then.

goldlilys’s picture

quicksketh,

Can you please make at least a dev version release with the patches that you've made for D7? So many patches on this thread that I'm getting lost as to which order I should start from and which patch is the correct one.

Thanks for an awesome module by the way.

vitok-dupe’s picture

and which patch is the correct one.

See #72

cartagena’s picture

Thanks, goldlilys. I was hoping to not have to convert sites...but I may have to go that route.

sonobor’s picture

Vitok,

Using nodereference_url-7.x-1.0-dev_1.patch with your command . . .

patch -p0 < nodereference_url-7.x-1.0-dev_1.patch

It deletes the install file and everything still says nodereference_url is missing.

removing nodereference_url as a dependency didn't work either.

vitok-dupe’s picture

I'm right now download and apply nodereference_url-7.x-1.0-dev_1.patch and everything like it should be.

vitok@vitok ~/Documents/drupal/modules/nodereference_url $ patch -p0 <'/home/vitok/Downloads/nodereference_url-7.x-1.0-dev_1.patch' 
patching file nodereference_url.info
patching file nodereference_url.install
patching file nodereference_url.module
vitok@vitok ~/Documents/drupal/modules/nodereference_url $ 
krabbe’s picture

Sub...

sonobor’s picture

Thanks, Vitok.

I'm not quite sure what you're saying.

Are you saying it already works? (If so, please re-post the patch you are using.)

Or are you saying you're working on it now and will have something for us soon?

Thanks again.

vitok-dupe’s picture

sonobor I'm saying that I download and apply the latest patch from this topic and all works. I'm not working on it anymore.

pragnatek’s picture

Could you please make a dev version release for D7 available to simplify installation?
Much appreciated.

quicksketch’s picture

Everyone asking for an immediate D7 version, see #73. I won't be adding the current patch until similar changes are made to D6. You guys may not need to care if the D6 version is maintained but I'm sure plenty of users will be using D6 for some time to come, and they'll want the same level of support as D7.

keith_k’s picture

Patch seems to be working fine.

tgriswold’s picture

subscribe

tgriswold’s picture

Hello vitok, (or anyone who has successfully patched the file) How about posting your patched file somewhere so others can access it? (if you mail it to me and I will gladly post it)

We all appreciate your efforts, but you have only given us ½ the solution. The sad truth is that absent a loadable (patched) file, there are hundreds, possible a thousand or more, of us who are trying to develop Drupal 7 sites but are blocked because we cannot get past this problem.

Applying a patch is probably a 30 second task for you and therefore it may seem like a trivial matter, but trust me it is not. Remember not all of us have access to the necessary technology (e.g., a Tortiose CVS + server) or the expertise to actually apply the patch. Many of us have no platform upon which we can build a server (e.g., due to security restrictions inside companies for example). In that case, we have no way to patch a file. Even if we could build a server, hours would be wasted researching and building, when there are those who could provide the solution to everyone in just a few seconds.

It would be most helpful and considerate, and it would go a long way to moving the Drupal 7 platform forward, if you would share your successful patch with those who need it, but can't get there from here.
Thanks, Tim

Chemtox’s picture

You underestimate yourself tgriswold (and many of us ;). Had you googled for "how to apply a patch", you would probably have done it by yourself in less time than it took you to write that post. All you need to apply one is any computer with the patch program, which comes standard with many *nixes and that you can easily get for Winbugs (the GnuWin32 version for example). This would be a worthy thing to learn if you're administering Drupal, as the fixes always appear first as a patch, and take some time to get released (just like now).

However, it *is* much simpler to just download the module, specially if you have never touched a command line, and since the patch has been proven to work for a good while now, I'm attaching a patched version. Hopefully an official release will come soon.

Cheers.

clashar’s picture

subscribe

please provide dev. version

AdrianC-1’s picture

I can see this both ways.

OTOneH, there shouldn't be a presumption of technical expertise. We're (nearly) all techies here, and we forget that not everybody is. We should be packaging to maximise ease of use - and that's one thing that D7 is _really_ good at with the module install/update.

OTOtherH, this is a _dev_ version. It's not even a publicly released dev version. If you're not at least partly techie, it's probably not for you _at this stage_.

A patch file is relatively straightforward. All you need to do is look at it, and it actually tells you what to remove and what to put in it's stead - and whereabouts in what file. It's a bit onerous, yes, compared to the single TUI line. But it's really not THAT hard.

WorldFallz’s picture

...but you have only given us ½ the solution.

How about none of the solution? Would that have been better? If someone walked up to you and gave you $10 when you needed $20 would you also complain? Please try to remember maintainers and those providing patches are doing so for free-- complaining about it is really poor form.

And adrian is quite right-- if you can't apply a patch and are even unwilling to try to learn then don't bother with dev versions. Complaining in issues queue about the state of dev versions is really quite counter productive.

clashar’s picture

I am not a newbie, but I have windows and believe me it's not so easy to apply patches there.

Sometimes I am obliged to make a patch almost manually: to divide a diff file to multiples to see what's wrong in which file etc. For example I take a patch in 92 and I have applied it to the file inside, but it could not be done with some error as "a patch could not be applied in selected area".

If there are many people who ask for a dev.version, means the is a demand, why just to not provide it if it so easy for some people to roll a patch.

AdrianC-1’s picture

Clashar..

...but I have Windows, and believe me it's not so easy to apply patches there.

Tortoise apart, have you tried...
http://gnuwin32.sourceforge.net/packages/patch.htm
...or similar?

spacereactor’s picture

this video show you how to apply patch. http://www.youtube.com/watch?v=WQUtkFROYik&feature=related

tgriswold’s picture

Chemtox thank you for providing the patched file I will try it immediately.

tgriswold’s picture

Geez! I didn’t mean to kick any mad dogs or slaughter any sacred cows! I just asked for some help, and I definitely appreciate the help I got. I also appreciate the good laughs provided by some very over-the-top responses my request elicited. Somebody could use a few days on a warm beach. I will avoid any reference to bad hair cuz I ain’t got none.

I spent a lot of time trying to figure this out prior to posting, but that is neither here nor there. The fact is the patching process is not well documented, or if it is, the documentation is not easily found. I did do a number of searches both on Google and Drupal. Incidentally, searching for “how to apply a patch” on Google yields 85,000,000 hits (that is the actual number, not some made up exaggeration), but the good news is it is only took 0.14 seconds. FYI, the same search on drupal.org yields 0 hits, but that took a bit longer. Google’s results include: Mac OS X, Windows, Linux, Oracle, MoodleDocs (whatever the hell that is), Subversion(?), Unix source code, and just for good measure how to apply birth control and Nicotine patches … and, that’s just the first page. Now before anyone jumps in to inform me that the processes are somehow all the same, you may know that, but how would anyone just starting out know that? Maybe we should exclude birth control and Nicotine patches, but then again maybe not, one involves irritable people and the other involves someone getting scr…. so it appears there are … well, let’s just not go there.

Anyway, I also searched Google for “how to patch drupal”, much better, only 2,270,000 hits (also a real number). And, there is even a link to http://drupal.org/patch/apply. Success!!! Well not quite, let’s just say that node is not real helpful for someone trying to figure out the patching process.

Now I will be the first to admit I am new to Drupal, less than 3 months, and that I am not a coder, but even I recognize that patching is a part of Drupal life, especially when you are playing on the bleeding edge of a new release. Having said that, it is my humble opinion that this platform offers sufficient learning opportunities without adding artificial cliffs or secret handshakes guarded by mad dogs and sacred cows. If patching is so damn easy, feed the dogs, milk the cows, pick up your keyboard, and write it up. Make it simple, avoid all geek-speak, assume we are totally clueless. We aren’t, but you will feel vindicated, and it will set your writing at the proper level for a diverse audience. Then please post your masterpiece on drupal.org with a title something like “how to apply a patch”. The dogs will stop barking, the cows will go quietly to the barn to chew their cuds, and us sheep will stop blatting as we will be able to find a nice grassy field where we can graze quietly without disturbing the farmer, the dogs, or the cows. (I was actually raised on a farm so I know all about the crazy things dogs, cows, and sheep do. And no, I am not calling anyone a farmer, a dog, or a cow. Just put down your keyboard and back away; nobody will get hurt. It is just my feeble attempt at a humorous metaphor to lighten up this very serious thread. Oh never mind, go write some code and forget you read this.)

cartagena’s picture

I also did the same searching on how to apply a patch and ended up with basically the same results...so, I finally decided to open a patch file and see what was there. Found the corresponding file in my drupal root, went to the designated line numbers and guessed that the "-" before one line of the patch meant to take that line of code out and that the "+" before the next line meant to put that line of code in. And voila, it worked! I'll have to come back after the next patch and let you know if that is the common patch protocol or not...

I must also add that I am very grateful to all the coders out there who write the modules, themes etc. and figure out the bugs and provide the patches. Someday I'd like to be more proficient at that but given that I'm well over the entry-level age for programmers that may not happen. Thanks to all!

Shadlington’s picture

Subscribing

WorldFallz’s picture

No one is purposely creating artificial cliffs or secret handshakes-- people, of all skill levels, are voluntarily contributing to improve a project. Everyone here is working on things based on their own needs-- there's no paid staff who's job it is to satisfy someone else's needs. You can wax poetic all you want-- complaining that what others are doing for free doesn't go far enough for you or doesn't meet your needs is both entitled and rude. And it's also going to have exactly the opposite effect of what you're trying to do. It's that simple.

murtza’s picture

Hi guys can some body send me teh patched version of module cus i am not able to apply patch with drush 4

jackbravo’s picture

Ok, so if I understad quicksketch correctly at comments 88 and 73 he wants the patch to have as little changes as possible compared with d6.

This is, d6 branch should have "Implements" instead of "Implementation of".

And d7 patch should move stuff as little as possible. So moving functions from location is not a good idea.

This is the same patch provided by vitok at comment 63 but without moving functions around. And also a d6 patch that changes "Implementation of" for "Implements".

It is against latest git checkout, so it doesn't have the CVS ids in case someone tries to apply this patch.

quicksketch, what else should be done?

stuwat’s picture

Subscribe

bryancasler’s picture

subscribe

artatac’s picture

Tried this D7 module and got

#Fatal error: Call to undefined function og_get_group_context() in D:\xampp\htdocs\d7school1\sites\all\modules\nodereference_url\nodereference_url.module on line 140
vitok-dupe’s picture

yep it's true. I didn't test and work on it. (Organic group i mean)

quicksketch’s picture

Awesome jackbravo! Thanks that's just what I was looking for. I'm still super booked but I'll try to get to this sooner than later. Any testers willing to try out jackbravo's patch in #105 would be appreciated.

g089h515r806’s picture

subscribe +

jackbravo’s picture

Taking comment 108 into account I updated the patch, but I have not tested it with og.

Ijaa254’s picture

Status: Closed (fixed) » Active
Issue tags: +D7 porting

Didn't work for me

stevector’s picture

Status: Needs review » Active

I got the following error when trying to use the patch in #112

patch -p1 < upgrade_to_drupal7-701670-108.patch   --dry-run
patching file README.txt
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file README.txt.rej
patching file nodereference_url.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file nodereference_url.info.rej
patching file nodereference_url.install
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file nodereference_url.install.rej
patching file nodereference_url.module
Hunk #1 succeeded at 32 (offset 1 line).
Hunk #2 succeeded at 72 (offset 1 line).
Hunk #3 succeeded at 109 (offset 1 line).
Hunk #4 succeeded at 143 (offset 1 line).
Hunk #5 succeeded at 198 (offset 1 line).
Hunk #6 succeeded at 209 (offset 1 line).
Hunk #7 succeeded at 221 (offset 1 line).
Hunk #8 succeeded at 313 (offset 1 line).
Hunk #9 succeeded at 358 (offset 1 line).
Hunk #10 succeeded at 426 (offset 1 line).

I was able to successfully apply the patch in #63

ropaolle’s picture

Sub

drupal a11y’s picture

Subscribe

g089h515r806’s picture

+1 needed a drupal 7 dev module branch

johnv’s picture

subscribe. I work happily with this widget since a few weeks.
Today I tried to use it as a 'Termreference URL Widget'. Ofcourse this didn't work, but IME changing from 'nodes' to 'entities' shouldn't be to difficult.
Is this possible?

Agence Web CoherActio’s picture

Subscribe

Argus’s picture

Subscribing.

I don't think this should be a discussion thread on the required patching abilities of the average Drupal user. For those seeking: #92 contains a working module patched to 7-dev.

jackbravo’s picture

For those interested I have a github repo for this: http://github.com/jackbravo/nodereference_url

You can download a zip file or tgz file from there. Here is the link:

https://github.com/jackbravo/nodereference_url/zipball/drupal-7

sergiofg’s picture

subs

drewkeller’s picture

subby sub sub

quicksketch’s picture

I've taken jackbravo's latest patches and extended them to account for a few things:

- Updated for code style.
- More backports to D6 where appropriate, splitting out the widget form into a new function.
- The function nodereference_url_process() is not an implementation of the new hook "hook_process", it's a #process function for form elements of type "nodereference_url". I reverted some of the changes and updated this function properly.
- The ability to use the fallback widget when editing (instead of creating) nodes was removed somehow in the last patch. This version restores it.

Attached are the patches that I've applied to Drupal 6 and Drupal 7 branches, plus a diff just showing the total of all differences between the D6 and D7 versions after both patches have been applied. Rather than everyone trying to reapply these patches, I'd suggest just waiting until I've fully tested this set of changes and a new release is created. Hopefully I should be done before the end of the day.

quicksketch’s picture

New 3.8 releases are now out for Drupal 6 and Drupal 7.

johnv’s picture

Wow, thanx!

cartagena’s picture

Thank you very much, I am grateful for all your hard work!

willmoy’s picture

Me too, and to jackbravo and others involved

steinmb’s picture

Thanx Nathan and @jackbravo for all your hard work! :-D

amalaer’s picture

Awesome, thanks!

Status: Fixed » Closed (fixed)
Issue tags: -D7 porting

Automatically closed -- issue fixed for 2 weeks with no activity.

Status: Active » Closed (fixed)