Course delete but still appear in LMS site

Hi dear all, I have deleted courses in backend and this course is not found in studio but this course is still appear in LMS site and when I click this course that is not found page.
How can I fix?
This error is in my ironwood production site. pls …

I think but I am not sure, it could be something related to cache or/and elasticsearch index. So restarting the service sometimes clears the cache while for courses index you might need to remove the course index or refresh courses index.

2 Likes

sir, I have restart my server and all edx services and all services are running ok but its still error… pls

@rose, can you provide detail on which page you are still getting those deleted courses? (Explore Courses page or Home page)

If it is Explore Courses page then certainly it is Elasticsearch indexes as Ghassan mentioned. And if it is the Home page then you can check the CourseOverview table data to be sure that it is not containing records of your deleted courses.

I hope this will help.

1 Like

Hi, these courses are in home page. I have checked course_overviews_courseoverviewtab in mysql and course overviews in admin django, these deleted courses are not found but they are still in home page and when I click this error show. pls …

sir , pls explain elasticsearch index, How can I remove or refresh course index cache or/and elasticsearch index. pls…

Again I am not entirely sure, If I were you, I would look for these places to refresh, recreate indexe:

I would also recommend going over lms.com/api-docs and try the API around, see which one returns e.g. courses/v1/courses the course you deleted, and then once the we know exactly which app/service is causing that, it would be easier to look for solution.

1 Like

Thank u so much for your advanced advice. That is helpful for me. I have used this command to reindex my courses and it fixed my issues. My deleted courses do not appear on the LMS site now.

$ curl -XDELETE localhost:9200/courseware_index
$ sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp cms --settings aws reindex_course --all