Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Views Data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2011 at 14:56 UTC
Updated:
9 Jul 2011 at 20:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedHm. Aliases is supposed to be optional!
Comment #2
neoglez commentedWell, just add any item...
Comment #3
neoglez commentedIf working with ajax this goes wrong.
Comment #4
dawehnerCan you try to describe how to reproduce the error?
I tryed to add fields to different entities etc. and don't get the problem here.
Comment #5
merlinofchaos commentedThis is interesting. I think this means something is actually using the key 'aliases' somewhere, and that's the problem. It's not an array.
Committed a fix to check to see that it's an array.
Comment #6
neoglez commented@dereine deactivate JS on the browser.
Exactly the other way around: it seems the error doesn't show.
First i have to say that the error is gone with the commit in #5 (1b903708db62e9c6e5544a5687c7ac6a74fdc140) and if i remove it the error is back again (tested in two different computers with totally diferents Drupal install).
Something i noticed: the 'aliases' key still will go through the foreach loop in views_fetch_fields (line 4863) but becouse this key is not defined (is supposed to be optional) it will be written to this entry "Error: missing @component" (you can test this with var_dump), what's that supossed to mean?
Comment #7
neoglez commentedComment #8
neoglez commentedWell, i think we're dealing here with two things:
One is the 'aliases' situation (by the way i attach a var_dump picture) as explained in #6.
The otherone is the Notice: Undefined index area in views_ui_add_item_form (see picture in #0). The problem is that depending on what views_object_types returns the key 'type' is gonna be present or not:
let's say $type is header (i want to add a header) then after this code $type = 'area' and then
There is no 'area' key for the $types array!
Comment #9
neoglez commentedPosting patch for Notice: Undefined index area in views_ui_add_item_form.
Comment #10
andypostAt first #5 commit is broken because is_array(empty(... always FALSE
Please roll this back
Comment #11
dawehner@neoglez
In general i think new issues are always better then opening the old one.
You can link the new one in the old one.
@andypost
Here is a patch which fixes the problem in general.
Comment #12
andypost@dereine That's what I mean in #10. Please commit it.
Comment #13
dawehnerUps, true. Thanks! Commited to 7.x-3.x