Closed (fixed)
Project:
UC Node Checkout
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2010 at 03:17 UTC
Updated:
10 Aug 2011 at 04:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
sammys commentedPatch attached
Comment #2
sammys commentedIgnore this patch. The name was wrong.
Comment #3
sammys commentedHere's a patch to use when patch in #771934: Add "Cancel" link to node add form buttons is applied first.
Comment #4
kmontyI would prefer wrapping the function with
if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {, but either one works. Let's get this committed.Comment #5
aidanlis commented$ git apply 771934_201004151800+1000.patch
771934_201004151800+1000.patch:146: trailing whitespace.
771934_201004151800+1000.patch:155: trailing whitespace.
771934_201004151800+1000.patch:161: trailing whitespace.
771934_201004151800+1000.patch:173: trailing whitespace.
771934_201004151800+1000.patch:184: trailing whitespace.
error: patch failed: uc_node_checkout.module:288
error: uc_node_checkout.module: patch does not apply
Could you please re-roll your patch? It's very unclear what you've changed and it does not apply cleanly. Instead of wrapping everything in a giant if(), use return or break it into a separate function.
Comment #6
aidanlis commentedComment #7
sammys commentedAll I did was surround the code with an if statement restricting it to run only when needed rather than every call to hook_form_alter().
Comment #8
tr commentedPatch didn't apply because the trailing whitespace in the original code has been removed sometime in the > 1 year since the patch was first rolled.
Ryan ought to be flogged with a wet noodle for that newbie mistake in hook_form_alter(). And for letting the patch languish for so long. Patch makes the important and vital change to execute that block of code *only* for node forms, not for every single form on the site.
Committed to the 6.x-2.x and 7.x-2.x branches. Thanks @sammys.