hi guys
any ideas why im getting this error on the page im displaying my views calc?
the views outputs the correct information but im getting this error aswell
Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (line 1355 of /modules/views/handlers/views_handler_field.inc).
Notice: Undefined variable: decimal in views_calc_table_total() (line 311 of /modules/views_calc/theme.inc).
Notice: Undefined variable: decimal in views_calc_table_total() (line 319 of /modules/views_calc/theme.inc).
Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (line 1355 of /modules/views/handlers/views_handler_field.inc).
Notice: Undefined variable: decimal in views_calc_table_total() (line 311 of /modules/views_calc/theme.inc).
Notice: Undefined variable: decimal in views_calc_table_total() (line 319 of /modules/views_calc/theme.inc).
Comment | File | Size | Author |
---|---|---|---|
#52 | fix-undefined-issues-1567108-52.patch | 1.89 KB | ssoulless |
#10 | views_calc.patch | 2.07 KB | amagdy |
#8 | view-export.txt | 39.67 KB | ayang |
Comments
Comment #1
ironbuilt CreditAttribution: ironbuilt commentedsubscribing...
Comment #2
prezaeis CreditAttribution: prezaeis commentedAnyone?
Comment #3
vthirteen CreditAttribution: vthirteen commentedexactly the same here
Comment #4
prezaeis CreditAttribution: prezaeis commentedIm assuming its got something to do with the decimal point in the integer field
Comment #5
jorgecsilva CreditAttribution: jorgecsilva commentedHi,
I think is an extra $ in line 311 of theme.inc file of the module. At least it solved for me.
Jorge
Comment #6
uaparac CreditAttribution: uaparac commentedHi
The post of Jorge solved some errors but there are still some unresolved.
Notice: Undefined property: view :: $ row_index in views_handler_field-> get_render_tokens () (line 1355 of / home / centrof / public_html / sites / all / modules / views / handlers / views_handler_field.inc).
Notice: Undefined property: view :: $ row_index in views_handler_field-> get_render_tokens () (line 1355 of / home / centrof / public_html / sites / all / modules / views / handlers / views_handler_field.inc).
Thanks Pedro
Comment #7
KarenS CreditAttribution: KarenS commentedUndefined variable notices are not critical errors.
I don't see any of these errors. I need steps to reproduce (and be sure you are using the very latest code).
Comment #8
ayang CreditAttribution: ayang commentedHi Karen,
I am also getting the errors related to the views_handler_field.inc. I have included the exported view as an attachment. Hopefully this can help you in reproducing and debugging the problem.
Thanks,
Andrew
Comment #9
joseph.muennich CreditAttribution: joseph.muennich commentedI get a similar set of error messages.
Below are details for two examples with slightly different error output.
note: In each case the Views Calc Table below the error messages looked to be rendered correctly.
Modules / versions in use:
Views Calc / 7.x-1.0
Views / 7.x-3.3
Example 1:
I constructed a page display using 3 visible fields from a content type (Title and two integer fields)
Format: Views Calc Table
Used "Sum" calculation in Views Calc Table > Settings for 2nd integer field
Recieved 1 iteration of the following error message for each node processed in the display: "Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (line 1355 of /my_site.com/modules/views/handlers/views_handler_field.inc)."
Followed by 2 error messages:
"Notice: Undefined variable: decimal in views_calc_table_total() (line 310 of /my_site.com/modules/views_calc/theme.inc)."
"Notice: Undefined variable: decimal in views_calc_table_total() (line 318 of /my_site.com/modules/views_calc/theme.inc)."
Example 2:
I constructed a page display using 3 visible fields from a content type (Title and two integer fields) and 1 node reference field that was excluded from display
Format: Views Calc Table
Used "Sum" calculation in Views Calc Table > Settings for 2nd integer field
Set Grouping field Nr.1 to the node reference field.
For each grouping:
I received 2 iterations of the following error message for each node processed in the display: "Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (line 1355 of /my_site.com/modules/views/handlers/views_handler_field.inc)."
Followed by 2 error messages:
"Notice: Undefined variable: decimal in views_calc_table_total() (line 310 of /my_site.com/modules/views_calc/theme.inc)."
"Notice: Undefined variable: decimal in views_calc_table_total() (line 318 of /my_site.com/modules/views_calc/theme.inc)."
Comment #10
amagdy CreditAttribution: amagdy commentedsame here, i created a patch for it
Comment #11
prezaeis CreditAttribution: prezaeis commentedcan u tell us what the problem was?
Comment #12
amagdy CreditAttribution: amagdy commentedthe module is working, but it would give me three pages full of warnings because of undefined variables, it is a simple thing, but not acceptable by my client :).
mainly there was four issues
review the patch for exact code changes, now there is zero warnings
Comment #13
prezaeis CreditAttribution: prezaeis commentedwow ur amazing thanks a lot
Comment #14
dealancer CreditAttribution: dealancer commentedI have the same problem, but I could not apply patch #10.
Comment #15
frishaynes CreditAttribution: frishaynes commented#10 worked for me, thanks
Comment #16
laboratory.mikeI had trouble applying the patch in #10 also; there's a few parts where "a" is substituted for "views_calc" in the patch, and I had to go through and apply those parts of the patch manually. The errors were gone after manually applying the patch.
Comment #17
Richard_1618 CreditAttribution: Richard_1618 commentedThis command was issued: /usr/bin/patch -p1 --verbose -d '/home/projectc/public_html/sites/all/modules/views_calc' -i '/home/projectc/public_html/sites/default/files/patches/views_calc[1].patch'
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -Naur a/theme.inc b/theme.inc
|--- a/theme.inc 2012-05-21 03:22:17.000000000 +0200
|+++ b/theme.inc 2012-06-13 22:27:51.540701849 +0200
--------------------------
Patching file theme.inc using Plan A...
Hunk #1 FAILED at 87.
Hunk #2 FAILED at 257.
Hunk #3 FAILED at 308.
3 out of 3 hunks FAILED -- saving rejects to file theme.inc.rej
Hmm... The next patch looks like a unified diff to me...
can't find file to patch at input line 33
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur a/a_handler_sort.inc b/a_handler_sort.inc
|--- a/a_handler_sort.inc 2012-05-21 03:22:17.000000000 +0200
|+++ b/a_handler_sort.inc 2012-06-13 22:04:05.017043022 +0200
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
Hunk #1 ignored at 6.
1 out of 1 hunk ignored
done
Please help (",)
Comment #18
sonictruth CreditAttribution: sonictruth commentedAs #16 pointed out: "a" is substituted for "views_calc" in the patch for some reason. I fixed it and just patched my copy and it looks like it's working great. I will attach my working patch.
Comment #19
p4s_help CreditAttribution: p4s_help commentedI've tried your new patch, and I get the same errors as #17, which is what I recieved for the original patch.
Both the dev version and the 'proper' release produce the same errors, but the patch doesn't work on either.
Attached are the errors I recieve when using viewscalc.
Also, I don't undertand alot about the backend of Drupal, but why do these errors not show when previewing on the views page itself?
Comment #20
surf12 CreditAttribution: surf12 commentedgood...worked for me, thanks.....
Comment #21
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedI had the same errors and patch in #18 (manually applied) solves the problem for me.
Setting the issue to "needs review".
Comment #22
DSN CreditAttribution: DSN commentedHi Jorge,
really it's good worked for me
Thank's
Deepak
Comment #23
mallezieI can confirm the patch in #18 works.
Setting to ready
Comment #24
morenstrat#18 works for me too.
Comment #25
KingSalibah CreditAttribution: KingSalibah commented#18 worked for me. Thanks!
Comment #26
vivdrupal CreditAttribution: vivdrupal commented#18 Works like a charm!
Comment #27
pmichelazzoPatch #18 working. Thanks!
Comment #28
jdufaur CreditAttribution: jdufaur commentedPatch #18 working well. Thanks!
Comment #29
j3ann0t CreditAttribution: j3ann0t commentedPatch #18 works perfect. Tx!
Comment #30
jaspm2004 CreditAttribution: jaspm2004 commented#18 worked flawlessly!!! many thanks!
Comment #31
prezaeis CreditAttribution: prezaeis commentedProblem fixed
Comment #32
mallezieReopening to allow maintainers to fix this. Issue should only be closed when patch is commited.
Comment #33
a.milkovsky1st: I agree with #18 about "Notice: Undefined variable: decimal..." issue. There are two signs "$" before variable.
2nd: I have another solution that differs from #18 about "view::$row_index" issue.
If you compare the code of table layout in views with views_calc table you'll notice that they are rendered in little different way.
There is the comment in views table:
This patch also fixed another problem for me: that views bulk checkboxes doesn't appear.
Comment #34
mdelpozo CreditAttribution: mdelpozo commentedIt worked for me!
Comment #35
johnlaine CreditAttribution: johnlaine commented#18 worked for me, Thanks!
Comment #36
windmaomao CreditAttribution: windmaomao commentedneed to include this to fix another bug on saving custom calc field
LINE 323,
Comment #37
KarenS CreditAttribution: KarenS commentedThere are duplicate reports of these issues. I just committed a couple fixes on other issues which should solve these problems. The solution may not be the same.
Comment #38
ChrisValentine CreditAttribution: ChrisValentine commentedRef post #19 by p4s_help - same for me - I updated to the more recent dev release (no better) then applied the patch in #18 but I still get errors as below that do not appear in the view preview.
Comment #40
arantas CreditAttribution: arantas commentedThanks! it worked fine for me, :-)
Comment #41
presleyd CreditAttribution: presleyd commentedI don't see any releases which contain this patch, Karen can you please clarify where these fixes were committed?
Comment #42
alblez CreditAttribution: alblez commented#33 work for my, thanks
using patch
Comment #43
RdeBoerPatch from #33 works a treat on Views Calc 7.x-1.0 with Views 7.x-3.7.
Or use 7.x-1.x-dev ... it works out of the box without the errors, no patch required.
Rik
Comment #44
ChrisValentine CreditAttribution: ChrisValentine commentedThe #18 patch fixed most of the errors but I still had one, which fixed in theme.inc line 225:
So now no errors - but I still need column summation to work with groups of rows.
Comment #45
jvandyk CreditAttribution: jvandyk commentedThe original issue remains in both 7.x-1.x-dev (line 311 of theme.inc) and 7.x-1.0 (line 310 of theme.inc).
The problem is that there are two dollar signs in the assignment instead of one.
should be
This results in the following error:
Comment #46
loophole080 CreditAttribution: loophole080 commentedI was still getting a variety of undefined index/property etc type errors with latest dev version. This may be an edge case as I'm using time_tracker custom entities/views and various fields pulled in with relationships.
However, in case it helps anyone, the attached patch fixes for me (applied agains latest dev).
I don't think this patch fixes the root cause, it's basically a work around adding some checks in where fields are missing in the $options['info'] arrays and/or $totals object, although the module code is expecting the fields to be available... So, maybe something further up the line needs to be addressed as to why the fields are not getting into that array/object as expected?
Comment #47
loophole080 CreditAttribution: loophole080 commentedps The above patch was developed against latest dev snapshot, which fixes "Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens()" separately, so...
If you apply this patch to 1.x-dev tarball version you will still get that one error, but if you apply it against the latest snapshot, should be all OK!
Comment #48
cameron prince CreditAttribution: cameron prince commentedI can confirm that the patch in #46 does not resolve the double $ bug described in #45, regardless of version.
Comment #49
News4u CreditAttribution: News4u commentedGreat #10 worked
but remains one more error unsolved:
Notice: Undefined property: stdClass::$sum__unknown in views_calc_table_total() (line xxx of /[path]/modules/views_calc/theme.inc).
Comment #50
News4u CreditAttribution: News4u commentedGreat #10 worked
but remains one more error unsolved:
Notice: Undefined property: stdClass::$sum__unknown in views_calc_table_total() (line xxx of /[path]/modules/views_calc/theme.inc).
Note: I enabled the global Math expression in view to have a new column of field row
Comment #51
ssoulless CreditAttribution: ssoulless commentedPlease commit the patch in #10 this is an old issue.
Comment #52
ssoulless CreditAttribution: ssoulless commentedWell after apply #10 I saw other problems with undefined property notices...
So here is a new patch with a little modification, I have it working on my production site and all seems great! no more errors and the module is working great.
Please review it.
Comment #53
KarenS CreditAttribution: KarenS commentedThe zip file for dev did not quite match the git checkout of dev, some of the latest fixes weren't in it. I have also made some additional fixes which I think cleans everything up. I can't reproduce any errors in the latest git checkout so I think this is all working now.
Comment #54
KarenS CreditAttribution: KarenS commentedComment #55
wismbuh CreditAttribution: wismbuh commentedopen line 310 on theme.inc
before:
$$decimal = !empty($fields[$field]
and after
$decimal = !empty($fields[$field]
it's work on me :-)
version = "7.x-1.0"
core = "7.x"
project = "views_calc"
datestamp = "1337564217"