Posted by bsuttis on October 4, 2012 at 7:59pm
3 followers
| Project: | Views |
| Version: | 7.x-3.7 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
The glossary view with AJAX enabled in combination with Language detection by URL does not work. It appears the argument does not get applied.
For instance, clicking 'F' should filter nodes that start with F, however it loads all results as if no contextual filter was provided. If I disable URL detection -- thus making the POST http://example.com/views/ajax instead of http://example.com/en/views/ajax -- it works.
If I disable AJAX, the view works as it should (/glossary/f loads with F results). Other AJAX calls in the site with the language prefix do not cause any issue.
Comments
#1
Narrowed it down to js/base.js
Attached is a patch, it checks for the existence of Drupal.settings.pathPrefix and prepends it to viewPath.
This makes
if (viewPath && path.substring(0, viewPath.length + 1) == viewPath + '/')pass, as without the language prefixpath.substring(0, viewPath.length + 1)was removing the last 3 characters of the pathWithout this patch, this happens:
path.substring(0, viewPath.length + 1)== en/admin/organizatioviewPath + '/'== admin/organizations/With this patch:
path.substring(0, viewPath.length + 1)== en/admin/organizations/viewPath + '/'== en/admin/organizations/#2
Good afternoon.
Thank your for this patch. It solved my bug too!
#3
Thank you..
It worked with me too!
#4
I tried this with latest views "7.x-3.7" version and it's working good.