# warning: Parameter 1 to theme_contemplate_field() expected to be a reference, value given in THE PATH\includes\theme.inc on line 617.

I'm attaching a patch to fix the warning.

Cheers

Comments

berdir’s picture

Status: Active » Needs work

You should upload a unified diff, you can generate that with "diff -up".

jm.federico’s picture

Ups My bad, you are right, didn't notice!

Will do!

Anonymous’s picture

I have tried the above patch. I was previously receiving many more lines of errors, not I am receiving 10 lines of the following error

"warning: Parameter 1 to theme_contemplate_field() expected to be a reference, value given in C:\xampp\htdocs\library\includes\theme.inc on line 656."

It would be great if one of the wonderful Drupal Gurus would explain like post #29 here http://drupal.org/node/613528#comment-2250424 so that newbies like me can understand. (and do a manual patch) Thanks in advance for any help :-)

I am running Drupal 6.16 on XAMPP with PHP 5.3

jm.federico’s picture

MY BAD, Hi Guys

I uploaded the Patch and as -Berdir- said I should have made a -unified diff-.

Here it is the new patch.

Now, I'm not a good teacher, but will do my best here:
My advice is to always apply the patch using the terminal window if you are on are running a mac or linux OS. If you are on a PC, well, I guess manual would be the way to go (http://drupal.org/node/60108).
Now to read a .patch file that has been done the proper way (meanning like the one I just uploaded, no the old one) what you look for is:

1.Thefile to patch, it might be given with a full path, a relative path, or just the file name, as in this case
+++ contemplate.module 2010-04-02 23:58:47.000000000 +1100

2.The lines where the change was made
@@ -889,7 +889,7 @@

3.The actual change

  *
  * @return unknown
  */
-function theme_contemplate_field(&$field) {
+function theme_contemplate_field($field) {
   $output = '<div class="field field-type-'. strtr($field['type'], '_', '-') .' field-'. strtr($field['field_name'], '_', '-') .'">'."\n";
   $output .= '  <h3 class="field-label">'. $field['widget']['label'] .'</h3>'."\n";
   $output .= '  <div class="field-items">'."\n";

Now, point number 3 will give you a line that was removed (-) and/or a line that was added (+) And will also give you 3 lines before and 3 liens after the changes, for you to know you are in the right place. The Line numbers in point 2, refer to the first of those 3 previous lines, and after the number of lines before applying the patch (889,7)

In this case you must go to the file contemplate.module, line number 889, look for the fourth line
function theme_contemplate_field(&$field) {
Replace that with
function theme_contemplate_field($field) {
and save the file

I hope this helps.

Cheers

jm.federico’s picture

StatusFileSize
new535 bytes

Ah, right, the patch

jm.federico’s picture

Ah, and remember to clear the cache after applying patches.

1. Log into Drupal admin
2. Click Administer -> Site Configuration -> Performance
3. Scroll to the bottom and click the button "Clear cached data"

Anonymous’s picture

@jm.federico

Thank you very much!
Easy to follow (even for a newbie) and worked perfectly. Again, thank you :-)

sarav.din33’s picture

hi jm.federico,

I am new to Drupal.. Sorry to ask this... Where would i add this patch(#5).

Please guide me on this issue as soon as possible...

Thanks & Regards
Sarav..

jm.federico’s picture

@sarav

Pls check comment #4
If that doesn't do it let me know, kind of in a rush right now!

Cheers

jrglasgow’s picture

Status: Needs work » Fixed

this fix has been applied

sarav.din33’s picture

Hi jm.federico,

Thanks for your guidenance...

Thanks & Regards
Sarav...

Status: Fixed » Closed (fixed)

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