One method for creating a multi-layer dictionary is to have the same item listed as a contextual filter multiple times. For instance, a two-layer dictionary works like so....
- Layer 1: List of all letters in the alphabet (or at least, the ones in use). The user clicks a letter to go to Layer 2
- Layer 2: List of all terms beginning with the letter chosen in Layer 1. The user clicks the term to proceed to a list of the content underlying that term.
To achieve this with, for instance, taxonomy terms, then "Content: Taxonomy term on node" must be added as a relationship in the view, and then "Taxonomy term: Name", using that relationship, must be added twice to the contextual filters. Both use "Display a summary" when no argument is passed, but the first one also uses "Glossary mode" and displays only 1 character.
The problem with Views 7.x-rc1 is that the contextual filters ought to be able to use the same relationship. Instead, the relationship must be duplicated and each contextual filter must use a different version of the relationship. Otherwise, an AJAX error occurs when trying to proceed to Layer 2.
Environment
- Drupal Core: 7.4
- Theme: Garland 7.4
Repro Steps:
- Begin editing a new or existing view.
- Add the relationship "Content: Taxonomy term on node".
- Add a "Taxonomy term: Name" contextual filter that uses the relationship created in step 2.
- Configure the contextual filter to "Display a summary" when the argument is not provided and to use "Glossary mode" displaying only 1 character.
- Add a second "Taxonomy term: Name" contextual filter that uses the relationship created in step 2.
- Configure the second contextual filter to "Display a summary" when the argument is not provided.
- Using the preview, click one of the alphabet letters displayed in Layer 1.
- Using the preview, click one of the terms displayed in Layer 2.
Expected Result:
The user is able to see a list of matching content and navigate to it successfully.
Actual Result:
After clicking on the term in Layer 2, the view attempts to load for a long time and eventually returns with an AJAX error. This also occurs on the actual view page (and not just in the Preview). The AJAX error displayed is:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/ajax/preview/viewpath/arg1/arg2
StatusText: Internal Server Error
ResponseText:
Current Workaround:
A second "Content: Taxonomy term on node" identical to the first one can be added to the view. When that is used with the second contextual filter, then there are no problems. Possibly this is by design, but it is counter-intuitive.
Comments
Comment #1
dawehnerBefore adding tags read the issue tag guidelines. Do NOT use tags for adding random keywords or duplicating the "Assigned" or "Component" fields. Separate terms with a comma, not a space.
Okay now to the actual problem. Can you try to enable php error logging and report the actual thing which is returned?
This would be somehow required to understand the issue
Comment #2
esmerel commented