Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2011 at 01:04 UTC
Updated:
7 Nov 2011 at 18:05 UTC
Jump to comment: Most recent file
Comments
Comment #1
deggertsen commentedForgot a fairly important point. The view works fine when logged in as the admin. It only gives the above error when trying to view the page as a visitor.
Comment #2
neoglez commentedMoving to the right version.
Comment #3
deggertsen commentedOops, my mistake on the version...
I have confirmed that the cause is the view that I attached above. I'm trying to mess with the view to see if there is one thing in particular I can pinpoint that is causing the problem.
Comment #4
deggertsen commentedCrap, changed it back to 7.x on accident.
Comment #5
deggertsen commentedOkay, so I checked out my permissions settings and it looks like the problem was there. I don't understand how that error has anything to do with field permissions but as soon as I made it so anonymous users can view the field used in the view along with the imagecache preset I'm using the page loaded fine with no errors.
Not sure if this is a bug or what but I will wait until somebody who knows more than me looks at this before I close it.
Comment #6
gansm commentedI novice on site and my english is bad. Sorry.
I have same error.
And i find problem:
in file views_plugin_style.inc currently
i.e.
Comment #7
bignall commentedThis fix worked for me as well.
Comment #8
barbi commentedCode credit: gansm - Comment #6
I checked out views 6.x-3.x
Looks like "id" param created in the loop is used outside the loop. I rolled out a patch for the same.
Not sure if any logic verification is required though.
Comment #9
dawehnerThe idea was to render the content of the last row. The important information is here "array()" so basically "$item" in get_render_tokens() is empty, so it only returns global values.
Comment #10
roam2345 commentedClosed http://drupal.org/comment/reply/1219372 as its the same issue as this.
Also further feedback with patch.
- Implemented patch and it breaks lots of views that previously worked. The case I have is not totally views specific but using the view_field_views add on to views witch renders views in fields in a view and that then started building more than one view per field 'if that makes sense'.
Tested on D7 branch.
Comment #11
adamdicarlo commentedThis looks like a bug, whether it's in Views or Panels (or core?). So I'm reclassifying the issue.
Comment #12
adamdicarlo commentedHere's a new patch that likely fixes the side-effects of the previous approaches here. The problem is that sometimes $keys is empty, so the for loop that should set $id never sets it. So $id is empty, and we try to run essentially $array['']->method();.
This patch is rolled off of 7.x-3.x head.
Comment #13
adamdicarlo commentedComment #14
vegardjo commentedI have the same thing, but maybe under some other conditions than other people here it seems.
I got this error on all single nodes that were connected to an Organic Group (no views involved), and also on all pages that included the view og_nodes that comes with Organic Groups. That view has
Field: Groups audience:gidset as a contextual filter. Also, I'm pretty sure this worked just a few days ago, and the only changes that have been made those days in between is an update to Drupal 7.7, and added Facebook Connect. So maybe there are some clues there?But, the patch in #12 did solve the problem for me! I've had a quick look around on the site and haven't seen any side effects so far
Comment #15
dawehnerMh,
This really shouldn't happen.
The function has
so you should have always fields availible. Just because an !empty fixes a notice doesn't have to mean that it's the right patch. Did someone already understood the fundamental problem why it's executing this code here?
So this seems to be a problem for many people but only one person managed to provide an export, so based on this
this sounds like a bug of the slideshow module.
Comment #16
gg4 commentedComment #17
adamdicarlo commented@dereine,
It's not a notice, it's a crash (a fatal error).
But yes, I don't understand the underlying problem. To prevent the WSOD for our sites for now, this patch is probably the best option so far, though. :/
Comment #18
adamdicarlo commented@_double:
That's not an error, it's a notice, and it looks like a completely different issue--it's happening in a different function. The issue you're seeing probably belongs in the Semantic Views issue queue. If the maintainers there find it's due to a Views bug, then it could come back to the Views issue queue (as a separate issue)....
Comment #19
jlab commentedI have been struggling with this problem a few days now... The view displays no error when logged in as the Drupal admin user.
I am using a table for the style plugin and still get the following error:
Fatal error: Call to a member function get_render_tokens() on a non-object in /var/aegir/platforms/xbasic-7.7-2.0/sites/all/modules/contrib/views/plugins/views_plugin_style.inc on line 319Here is a dump of my view:
If this might be of any help I installed views-7.x-3.0-beta3 and imported my views and everything seems to be working fine with that version of views.
Comment #20
ekkosmos commentedStill is not working right! The problem seems to be Views 7.x-3.0-rc1...
Comment #21
SchwebDesign commentedEDIT: Okay disregard the below. This happened for me because the fields output in the view didn't have view permission for the anonymous user, thus the view output was empty. The patch helped, but of course my real solution was to not have an empty view output and enable the fields.
----------------------------------------------------------------------------------------------------------------------------------
hmmm.... interesting that I got this exact error,
this only happens for me as anonymous user when viewing the view page, not as admin user when viewing the view page.
but I'm using...
Drupal 6.22
Views 6.x-3.x-dev with this info in the .info
Information added by drupal.org packaging script on 2011-08-06
datestamp = "1312591803"
Views Slideshow 6.x-3.0-beta1
Views Slideshow: Cycle 6.x-3.0-beta1
Views slideshow: DDblock 6.x-2.0
My error:
Comment #22
dawehner@SchwebDesign
This is a damn helpful column, really. The problem is as you described if you have access to no fields
Commited the patch from above with a small comment above. Thanks again for everyone trying to figure out the problem.
Comment #24
SchwebDesign commentedthis just happened to me again. I knew it looked familiar but couldn't remember what i did to fix it until i found my own post above! How silly i felt... but regardless... does anyone agree that there should be some other behavior (rather than WSOD) when this case occurs. Perhaps a notice saying "you do not have permission to view any of the fields in this view."
Comment #25
othermachines commentedIf it helps, I received this fatal error in 7.8 (no patch applied) after I accidentally deleted a content type. The page was trying to load a view that used one of its fields (which of course no longer existed). I do have Views Slideshow installed but I wasn't using it for this particular view.
I do agree that WSOD is overkill, although in my case my slip (deleting a content type) was severe enough and it certainly grabbed my attention right away. The "no access" problem wouldn't warrant that, though. Perhaps better to not load a view when fields are required for display and yet there are no fields or the user doesn't have access to them? Or if multiple fields, just hide the problematic fields?