Support » Plugin: LearnPress - WordPress LMS Plugin » Learnpress v.4 course list json error
Learnpress v.4 course list json error
-
Hi, we updated LP into v.4 and updated all the premium addon.
Our customers inside purchased list of courses now get json error message and can’t access to the purchased courses.
-
Hi steplab,
Can you send us the image errors or some message?
Thanks.
La risposta non è una risposta JSON valida.
/wp-json/lp/v1/profile/course-tab?userID=2086&query=purchased&layout=list&status=&_locale=user
{“code”:”rest_forbidden”,”message”:”Non hai i permessi per farlo.”,”data”:{“status”:401}}Now doesn’t work also content drip premium:
User complete a lesson, the lesson seems like is correctly completed and when the user go to the next lesson get the message:
Sorry! You can not view this item right now. It will become available when you completed <PREVIOUS_LESSON> (GMT +2)from debug.log:
[04-Oct-2022 10:00:13 UTC] PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1918557-08-19 12:30:36) at position 14 (1): Double time specification in /public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php:65[04-Oct-2022 09:45:30 UTC] PHP Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in /public_html/wp-content/plugins/learnpress/inc/class-lp-ajax.php:298
Stack trace:
#0 /public_html/wp-content/plugins/learnpress/inc/class-lp-ajax.php(298): Exception->__construct(‘Hai gi\xC3\xA0 comple…’, ‘error’)
#1 /public_html/wp-includes/class-wp-hook.php(307): LP_AJAX::complete_lesson(”)
#2 /public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
#3 /public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#4 /public_html/wp-content/plugins/learnpress/inc/class-lp-request-handler.php(166): do_action(‘learn-press/aja…’)
#5 /public_html/wp-includes/class-wp-hook.php(307): LP_Request::do_ajax(‘complete-lesson’, ‘lp-ajax’)
#6 /home/customer/w in /public_html/wp-content/plugins/learnpress/inc/class-lp-ajax.php on line 298
[04-Oct-2022 09:45:41 UTC] PHP Fatal error: Uncaught Error: Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in /public_html/wp-content/plugins/learnpress/inc/class-lp-ajax.php:298
Stack trace:
#0 /public_html/wp-content/plugins/learnpress/inc/class-lp-ajax.php(298): Exception->__construct(‘Hai gi\xC3\xA0 comple…’, ‘error’)
#1 /public_html/wp-includes/class-wp-hook.php(307): LP_AJAX::complete_lesson(”)
#2 /public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
#3 /public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#4 /public_html/wp-content/plugins/learnpress/inc/class-lp-request-handler.php(166): do_action(‘learn-press/aja…’)
#5 /public_html/wp-includes/class-wp-hook.php(307): LP_Request::do_ajax(‘complete-lesson’, ‘lp-ajax’)
#6 /home/customer/w in /public_html/wp-content/plugins/learnpress/inc/class-lp-ajax.php on line 298[04-Oct-2022 10:00:13 UTC] PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1918557-08-19 12:30:36) at position 14 (1): Double time specification in /public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php:65
Stack trace:
#0 /public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php(65): DateTime->__construct(‘1918557-08-19 1…’, Object(DateTimeZone))
#1 /public_html/wp-content/plugins/learnpress/inc/user-item/class-lp-user-item.php(380): LP_Datetime->__construct(‘1918557-08-19 1…’)
#2 /public_html/wp-content/plugins/learnpress/inc/templates/class-lp-template-course.php(1077): LP_User_Item->get_expiration_time()
#3 /public_html/wp-content/plugins/learnpress/templates/single-course/sidebar/preview.php(29): LP_Template_Course->user_time()
#4 /public_html/wp-content/plugins/learnpress/inc/lp-template-functi in /public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php on line 65Hi steplab,
Are you view another user profile? If right, you must go to LearnPress > Settings > General > Publish profile then enable. And from the user, who user wants to publish info, the user must enable like the image
About Add “Content Drip”. You use a premium plugin so you can create a topic. So we easy check issues.
Thanks.
Hi steplab,
What is the version of Learnpress your site using?
Thanks.
Learnpress 4.1.7.1
Learnpress content drip 4.0.1
Wordpress 6.0.2Now we disabled the addon plugin: LearnPress – Content Drip
to enable users to access the next lesson after completing the previous lessonHi steplab,
Please update Learnpress to version 4.1.7.2, Learnpress Content Drip to 4.0.2
Thanks.
Updated to the last version these plugins
but still get errors now also inside single course page:[05-Oct-2022 12:36:35 UTC] PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1918557-08-19 12:30:36) at position 14 (1): Double time specification in .../public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php:65 Stack trace: #0 .../public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php(65): DateTime->__construct('1918557-08-19 1...', Object(DateTimeZone)) #1 .../public_html/wp-content/plugins/learnpress/inc/user-item/class-lp-user-item.php(380): LP_Datetime->__construct('1918557-08-19 1...') #2 .../public_html/wp-content/plugins/learnpress/inc/templates/class-lp-template-course.php(975): LP_User_Item->get_expiration_time() #3 .../public_html/wp-content/plugins/learnpress/templates/single-course/sidebar/preview.php(29): LP_Template_Course->user_time() #4 .../public_html/wp-content/plugins/learnpress/inc/lp-template-functio in .../public_html/wp-content/plugins/learnpress/inc/class-lp-datetime.php on line 65
this function get errors:
LearnPress::instance()->template( ‘course’ )->user_time()
inside file: plugins/learnpress/templates/single-course/sidebar/preview.php
we temporarily commented this line, hope this will be fixed..
the learnpress function is not working is:
get_expiration_time()by commenting this function inside files, course list and single course page is returned working
Hi
this function get errors:
LearnPress::instance()->template( ‘course’ )->user_time()
1918557-08-19 => We don’t know why the time on your site is like that, it is an invalid time :). So make the error.
Please retry to save the Date format and time zone.
We’ll check and fix it, then public a beta version for you can test.
Thanks.
Hi seems the same error that and also learnpress – content drip 4.0.2 sometimes block the access to the next lesson also if previous lesson is completed:
Sorry! You can not view this item right now. It will become available when you completed <LESSON> (GMT +2)
We are from Italy and wordpress general settings are corretly configured with that.
Hi steplab,
What version of PHP do you use on your site?
Thanks.
Hi,
PHP 7.4.32
- You must be logged in to reply to this topic.