Closed (fixed)
Project:
Semantic Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2010 at 00:30 UTC
Updated:
30 Oct 2014 at 10:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rfayThis is what I believe the correct fix will be - It doesn't use $semantic_views if it wasn't set.
Comment #2
jensimmons commented+1 to whatever fixes this. These errors are making me sad. (Well, along with the other 2 dozen errors on our project.)
Comment #3
rfayA couple of more warnings due to unchecked variables.
Comment #4
Anonymous (not verified) commentedI don't experience this problem. I think this may be occurring because you're saving a view, editing it again later by adding new fields, and not editing the semantic views settings for the output style. Can someone positively verify if this is the cause?
Does this make the problem go away: editing the view, opening up the semantic views style options, confirming them and saving the view?
If this is the cause, we should be adding some default values to the view as it is saved (which wasn't possible when I originally wrote this module) or if that can't be done, add them in the preprocess hook. If someone can narrow down the circumstances where this problem arises, that would help us make the best fix.
I would prefer to catch and fix the problem before Drupal renders the template. I mean to say that if the problem exists once Drupal starts rendering templates, we've missed the best opportunity to avoid the error. (#3)
Comment #5
fuzzy76 commented+1 for this, $vars['options']['semantic_html'][$id] is unset in template_preprocess_semanticviews_view_fields()
Comment #6
brianV commentedHere is this patch ported to the D7 branch (master). In D7, we were getting pages full of:
Notice: Undefined index: title in template_preprocess_semanticviews_view_fields() (line 32 of /var/www/drupal/sites/all/modules/semanticviews/semanticviews.theme.inc).every time someone tried to load a views page that had sematic views.
Comment #7
smira commentedthank you brianV
i can confirm the above patch worked for my drupal6 pressflow install with php 5.3.5
Comment #8
vaartio commentedAnd I can confirm the 7.x patch seems to work as well.
Comment #9
gg4 commentedsubbing
Comment #10
Anonymous (not verified) commentedI followed bangpound's advice at #4 and it worked. The patch is not needed, just open and re-save the semantic views settins for the master display ("All displays").
By default the master display disappears after adding a customized display to the view. I found it useful to check "Always show the master display" at
admin/structure/views/settings. It clears up many confusing situations when building complex displays with many overrides.Comment #11
timfarley commentedThis fixed the issue for me too. Just open your primary(master) display and go into the Semantic Views settings and then resave - all errors disappeared. I'm using Semantic Views 7.x-1.x-dev and Views 7.x-3.0-rc1.
Comment #12
RunePhilosof commentedBangpound comment #4 verified (in 6.x-1.1).
This error happens when I add a field, until I edit the semantic_views.
Is your proposed fix of "adding some default values to the view as it is saved" possible now?
Comment #13
anouHello,
makes the Notices go away.
I confirm.
Thanks for the tip.
Comment #14
catchlight commentedAgree with Edith Illyés #10 that Bangpounds advice in #4 does indeed work.
My 2 cents worth on this topic is that perhaps the Semantic Views module could detect unclaimed variables and put up a nice helpful message instead.
Something like...
"Please Note: You may have fields in your view that have not been given Element and/or Class attributes.
For Semantic Views to work as expected you need to specify classes and elements in your view, this is done within the current View. Format > Show Semantic Views > Settings."
The rest could go into Advanced help perhaps.
Comment #15
Stan.Ezersky commentedbrianV, thanks for patch
Comment #16
chris.hunter commented#4 #13 worked for me. Thanks!
Comment #17
Daniel Schaefer commentedThe issue was fixed for me by enabling "Hide empty fields" in the display settings.
Comment #18
valderama commentedapplied patch from #6 and notices as described went away! thanks!
Comment #19
taiger commentedSaving the view again and checking "hide empty fields" did not work for me.
Patch from #6 did work. Thanks.
Comment #20
taiger commentedManaged to get it working without the patch by changing the view.
However, this patch simply checks for unset variables. Probably something that should already be happening.
Comment #21
poniesResaving the view with 'skip empty fields' checked in the Semantic Views : Fields | Settings cleared this up for me.
Comment #22
Jack3rror commented#6 made my day
Nobel Price ?
Erratum .. made my night
Comment #23
phiscock commented#6 solved the problem for me when nothing else worked.
Comment #24
Delphine Lepers commented#21 does the trick
Comment #25
fluffy commentedPatch in #6 worked for me too, +1 to commit.
Comment #26
mrhayao commented#21 rulez.
No patch, no confusion.
Just what has to be done.
Comment #27
jdflorez commented#21 worked for me, so thanks
Comment #29
Scyther commentedFixed and commited. Changed the patch a bit, but this should work nicely to.