After upgrading views to 6.x-2.6 from 6.x-2.5, my only two views with required relationships fail. (CCK was previously updated from 2-3 to 2-4 and seems fine)
The first one uses a default argument of Node ID from URL in Table format.
The second uses a default argument of PHP code in HTML list format.
The "live preview" says nothing was run. I can't "repair them" by alternative arguments.
When I revert the Views Code back to 6.x-2.5 these two views display properly.
I couldn't find the same bug already posted, so I hope this is useful a new entry. Thanks for your efforts! PS - I upgraded the Views Database to 6004 so I hope this isn't an issue for the 2.5 code. It seems to work well.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | course_ct.txt | 2.44 KB | rezboom |
| #2 | organisation_ct.txt | 779 bytes | rezboom |
| #2 | course_org_view.txt | 4.44 KB | rezboom |
Comments
Comment #1
merlinofchaos commentedI would need to see Views this happens with, as I don't understand the conditions that can cause it. Preferably the simplest view you can come up with that demonstrates the problem, and preferably that doesn't use CCK fields or fields from modules I may not have installed.
Comment #2
rezboom commentedOK, here is my description of this issue, I tried to make the required "ingredients" as simple as possible.
Consider the following scenario:
There are 2 content types: "course" and "organisation". (please see the attachments for the exported content types "course_ct.txt" and "organisation_ct.txt")
The "course" has a node reference to an "organisation".
The view (please see attached export of the view "course_org_view.txt") should produce:
A table with 2 columns, listing the courses in the left column and the node referenced organisation in the right column.
Note that as described so far, views2.6 works.
However, when an exposed filter is added that allows selection of the organisations (e.g. only show courses of organisation1), the view fails.
Furthermore, if the option "force single" is active: if while viewing the view "Any" is selected, the results ARE displayed, but if one or more organisation is selected, the "empty text" is displayed.
I hope this is a sufficiently accurate description - if not, please tell me what else you need to know.
Thank you very much!
Comment #3
esmerel commentedComment #4
rezboom commentedPlease indicate what more information is needed - I will gladly try to provide it.
Thanks!
Comment #5
rezboom commentedbump!
any info would be greatly appreciated - thank you!
Comment #6
merlinofchaos commentedOk, this one took me a little bit to work out.
The way you've got your view set up, there's two nodes.
The BASE node is the course.
The RELATED node is the organization.
Now, this is a little tricky, and I can see why it's giving you trouble:
You have a filter on Content: Organisation using the organisation relationship.
The problem? Organisation is a field on Course, not on Organisation. What you've actually told the view is "Show me all courses whose organisation references this organisation". Organisations do not reference other organisations, so the view always returns no results.
If you remove the relationship from the filter, suddenly the view works just dandy.
Comment #7
rezboom commentedThank you so much for figuring this out!
I was (almost ;-) ) going crazy with this and also not being able to update views to the latest version is hell!
but now, all is well - thanks again! :-)