Lesson Duration not displaying correctly
-
This bug appeared recently, where my lessons are not displaying the correct duration time anymore. If I copy a lesson from another one, it automatically takes that time. If I add a new “fresh” one, it just shows 0:00. See screenshot
https://ibb.co/p6zPJk87Tried disabling all plugins and reverting the default theme, but issue persists…
-
Hello @patriciava ,
Thank you for the details and for testing by disabling plugins and switching the theme.
Regarding the behaviour you’re seeing:
- When you duplicate a lesson, it copies all the existing content from the original lesson, including the video and its duration. So the time showing there is expected.
- However, when you create a new lesson, the duration should be automatically fetched from the newly added video.
If the new lesson is showing 0:00, then yes — this is a known issue currently present in Tutor LMS.
We will report this to our development team so it can be properly reviewed and addressed in a future update.
For now, as a temporary workaround, please manually set the duration from the Video Playback Time section in the lesson builder to display the correct time.
Thank you for your patience and understanding.
Best Regards,
SunjidaI am always setting the duration manually… I wasn’t even aware that it is supposed to do that by itself. But even if I change the Video Playback Time, it continues to show 0:00 or the one copied previously.
Could you please try clearing your site cache (including any caching plugin or server/CDN cache) and then reload the lesson page? After that, check if the duration is fetched correctly or not.
We are not using any caching on the site as too many users have reported issues with purchasing courses.
I am also testing it in incognito mode…
-
This reply was modified 3 days, 7 hours ago by
patriciava.
-
This reply was modified 3 days, 7 hours ago by
patriciava.
Hi @patriciava ,
Often due to transient values the custom lesson durations do not take effect even after clearing the cache. Could you try clearing the transient values from your database and check if the issue persists ?
Here is a reference : https://mainwp.com/how-to-delete-all-transients-in-your-sites-database/Hi @maizul ,
I’ve deleted all the transients via the DB but it still persists. I can add new lessons now and it accepts the duration, but the already created lessons cannot be changed… Do you have any other ideas? I would really not like to create the whole module again…
-
This reply was modified 2 days, 11 hours ago by
patriciava.
I was able to figure it out with the help of AI. Here is the solution that worked for me now, in case anyone else has this issue. Note: Better not to duplicate lessons…
When you clone a lesson, WordPress copies the entire
wp_postmetatable for that post. Tutor LMS stores the video metadata (like Vimeo/YouTube links,playtime, andduration_sec) as a serialized PHP array.
If you simply swap out the video URL in the cloned lesson, Tutor LMS sometimes fails to trigger a new API call to fetch the updated runtime. It just holds onto the serialized runtime of the original lesson.You need to force Tutor LMS to invalidate the current meta value and rebuild the serialized array from scratch. Here is the workflow:
- Open the affected lesson in the WordPress backend.
- Cut/remove the video URL entirely so the field is empty.
- Click Update to save the lesson.
- Paste the video URL back into the field.
- Click Update again.
This forces the system to ping the video hoster (Vimeo/YouTube) again, fetch the correct duration, and safely rewrite the serialized array in your database.
Hey @patriciava ,
Thank you for sharing the update and your findings. We appreciate you taking the time to document the solution, it will definitely help others facing the same issue.
Please note that lesson duplication is a Pro feature, and support for commercial features is limited in the forum.
You must be logged in to reply to this topic.