Unfortunately we don't have an alternate or temporary solution at the moment. The issue is still under investigation by our compatibility team.
However here's some information I received from the team so far:
- the slug courses (kurser) is used by a CPT and the page "Courses".
- the slug lesson (lektion) is used for 3 different CPTs: Lessons, Quizzes and Assignments hidden link
- But the permalink bases for those CPTs are different in the plugin options hidden link
So it could be that:
- there is a conflict between the permalink base and the CPT slug or
- WP is having a hard time resolving the URL because several CPTs are using the same slug (and the slug translation adds an extra layer of complexity that WP can't handle).
The fact that a few things work on the sandbox where slugs are not translated is a good indicator, but need to investigate more.
Given that, please note that WordPress does not allow the same/duplicate slugs for CPTs and taxonomies. Since I don't have access to your staging site anymore (the temporary link has been expired), please correct the above mentioned in WPML -> Settings -> Post Type Translations and in Tutor LMS settings. These should be unique in all languages (default and translated). Then save the settings, clear caches and try again.
If that helps improving the situation please let us know.
P.S.: I'll be off over the weekend and 'll be able to attend on Monday.
Thank you for your patience and cooperation. There's more on this matter by our compatibility team, please consider following.
We can't do much here, the integration is handled by Tutor LMS. In the meantime you can do the following:
1) Don't translate the permalink bases and slugs
- You can go to "WPML > String Translation" and search for "courses" and "lessons" to delete them (admin_texts_tutor_option).
- This will solve the main issue and prevent 404s when navigating from the course to the lesson. Lessons URLs will be resolved.
2) Modify the plugin's code to get the correct URL in the language switcher
Note that we don't recommend this for two reasons:
a) Not future proof. Changes made will be overwritten at the next plugin update.
b) We don't think that a lot of visitors will switch languages in the middle of a course. We believe that the user should complete the full course in the same language (plus we don't think that the lessons already validated in one language will be validated in the second language. This means that the user might have to re-pass all lessons and quizzes).
Having said that, if you want to do it:
- Open /wp-content/plugins/tutor/classes/Rewrite_Rules.php file for editing.
- Replace: