Been using a version of 2.18 for a while with a lot of changes to it. All of a sudden, out of nowhere, when I click on any of the filter headings nothing happens. No dropdown box below them, nothing. Search still works but the filters would be more useful. Does anyone have any ideas what might have happened? I didn't make any changes in the last few months yet it seems to have stopped working in that time.
Thanks in advance.
Filter not working
Moderators: Developer, Contributor
Re: Filter not working
Thanks for that. Seeing a few errors.
Refused to load image xxxxxxxxx because it violates the following Content Security Policy directive: "img-src 'self'" accounts for 6 of them but that doesn't appear to be the issue. On cllicking one of the headings that should give me a dropdown it give:
Uncaught ReferenceError: translations is not defined
at HTMLAnchorElement.<anonymous> (common.js:128)
at HTMLAnchorElement.dispatch (jquery-2.2.4.min.js:3)
at HTMLAnchorElement.r.handle (jquery-2.2.4.min.js:3)
At this point in time, bit out of my depth!! I've not changed a thing on my server since it was working OK.
Refused to load image xxxxxxxxx because it violates the following Content Security Policy directive: "img-src 'self'" accounts for 6 of them but that doesn't appear to be the issue. On cllicking one of the headings that should give me a dropdown it give:
Uncaught ReferenceError: translations is not defined
at HTMLAnchorElement.<anonymous> (common.js:128)
at HTMLAnchorElement.dispatch (jquery-2.2.4.min.js:3)
at HTMLAnchorElement.r.handle (jquery-2.2.4.min.js:3)
At this point in time, bit out of my depth!! I've not changed a thing on my server since it was working OK.
Re: Filter not working
Seems the issue is in js/common.js with this bit of script:
Code: Select all
$('a.dynamic-filter-expander').click(function(event) {
event.preventDefault();
var fieldID = $(this).attr('id');
var filter_id = $(this).data('filter_id');
var filter_tmp_id = $(this).data('filter');
var targetID = fieldID + '_target';
var viewType = $('#filters_form_open input[name=view_type]').val();
$('#' + targetID).html('<span class="dynamic-filter-loading">' + translations['loading'] + "</span>");
var params = 'view_type=' + viewType + '&filter_target=' + fieldID;
if( undefined !== filter_id ) {
params += '&filter_id=' + filter_id;
}
if( undefined !== filter_tmp_id ) {
params += '&filter=' + filter_tmp_id;
}
$.ajax({
url: 'return_dynamic_filters.php',
data: params,
cache: false,
context: $('#' + targetID),
success: function(html) {
$(this).html(html);
},
Re: Filter not working
Check with browser networks tools.
There should be something like the marked line, and as response the translations['loading'] (see right part of the scrennshot.
There should be something like the marked line, and as response the translations['loading'] (see right part of the scrennshot.
Re: Filter not working
This is going to sound like a basic question but how do I get that open?
Re: Filter not working
Thanks. Swapped to firefox so that I could match against yours (was having no joy in Chrome).
I have the same info as you after clicking on one of the filter headings but also something rather weird. It appears some extra text crept into a file which I've now removed. But the server still seems to be offering that particular version up. Different browser on original PC and all is well. Same browser as before and same problem (Chrome - although I can get developer tools up I can't get the list of requests or responses)
I have the same info as you after clicking on one of the filter headings but also something rather weird. It appears some extra text crept into a file which I've now removed. But the server still seems to be offering that particular version up. Different browser on original PC and all is well. Same browser as before and same problem (Chrome - although I can get developer tools up I can't get the list of requests or responses)
Re: Filter not working
Perfect - sorted it. Thanks very much for the help.