Closed (fixed)
Project:
Field Collection Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Nov 2012 at 16:02 UTC
Updated:
9 Dec 2012 at 13:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
g089h515r806 commentedCould you reroll your path to dev version?
I could not apply it.
Comment #2
g089h515r806 commentedMake sure the old version still works correctly.
Change
back to
Comment #3
daffie commentedOops, I did check out the master version from git and not the 7.x-1.x version.
The tabs are already changed to spaces in the dev version.
If have added an extra if-statement to make sure the old version will still work correctly.
An other option for this problem to combine name and display_id into one large dropdown element.
In views you have a header and a footer area. There you add the field "Global: View area".
The "View to insert" is a combined dropdown element.
Comment #4
g089h515r806 commentedI think it will be better if use ajax to fetch the display options. THere is an example: http://drupal.org/sandbox/katbailey/1361118.
you could find the ajax code at here:
Comment #5
g089h515r806 commentedwe could implement it in this way:
Comment #6
g089h515r806 commentedwe could implement it in this way:
Comment #7
daffie commentedI do not know why but with the ajax call there is no $form_build_id variable set. This in turn will result in a watchdog error: "Invalid form POST data.". The comments that are with the code (includes/ajax.inc) that generates this error is:
// If $form cannot be loaded from the cache, the form_build_id in $_POST
// must be invalid, which means that someone performed a POST request onto
// system/ajax without actually viewing the concerned form in the browser.
// This is likely a hacking attempt as it never happens under normal
// circumstances, so we just do nothing.
I have tried to use an ajax solution before and had the same problem. That is why I used an other solution to fix the problem. If you do not like this solution, what do you think of my suggestion in comment #3.
Comment #8
g089h515r806 commentedHave you read the code of http://drupal.org/sandbox/katbailey/1361118, it use ajax and work correctly.
There is an issue about this module, http://drupal.org/node/1815116, and I have read the code of it, and found that it use dropdowns.
I think that it is not difficult to port the ajax code to this module, if you have problems, you could update your Drupal version to latest version. Maybe it is ok with latest version.
Comment #9
g089h515r806 commentedThere is an ajax issue associated with Entity Reference View Field Formatter, http://drupal.org/node/1623460 ,
It was fixed by merlinofchaos, the author of Views.
Comment #10
daffie commentedYes I have read the code. I am not 100% sure but I think that katbaileys hook_field_formatter_settings_form() is being called an other location.
The ajax call alone will result in an error. The callback function does not even get called. If you add:
to the element "name". Add then select an other view, the ajax call is made and the watchdog log is the result. Maybe this is a views bug???
Comment #11
daffie commented#9: As far as I can see. Their problem is in the ajax callback function. Our/my problem is that the callback function is not even reached. The variable $form_build_id is empty and this results in a watchdog error.
Comment #12
g089h515r806 commentedI have fixed it using ajax.
Comment #13
daffie commentedI love to know how you did it.
Comment #14
g089h515r806 commentedHere is the code:
Comment #15
daffie commentedIf it is working on your site, then there must be something wrong with my development site. Because I am getting the watchdog error "Invalid form POST data".
Comment #16
g089h515r806 commentedcommited, grant the credit to your account, you have worked on this feature and fixed it first.
Comment #17
daffie commentedThank you for the credit