Skip to content

Conversation

@Anindra123
Copy link
Collaborator

@Anindra123 Anindra123 commented Dec 23, 2025

Provided Fix:

  • The main issue was in _archive.js file this line of code which adds an additional item to the filter_criteria list which is tutor-course-filter-category
if ( !('category' in filter_criteria.supported_filters) ){
            const filter_property = 'tutor-course-filter-category';
            const category_keys = Object.keys(params).filter((val) => val.includes(filter_property));
            if (category_keys.length > 0) {
                const category_ids = [];
                category_keys.forEach((category_key) => {
                    category_ids.push(params[category_key]);
                });
                filter_criteria['tutor-course-filter-category'] = [...new Set(category_ids)];
            }
            else {
                filter_criteria['tutor-course-filter-category'] = JSON.parse($("#course_filter_categories").val());
            }

        }
  • The main error was obtained this line filter_criteria['tutor-course-filter-category'] = JSON.parse($("#course_filter_categories").val()); given above as the html element with id #course_filter_categories did not have any element thus it was returning undefined.
  • Removing that line fixed the issue

@Anindra123 Anindra123 requested a review from shewa12 December 23, 2025 11:09
@Anindra123 Anindra123 added bug Something isn't working 3.9.5 labels Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.9.5 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants