-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Critical error Uncaught TypeError: Sensei_Assets::get_icon() #7594
Comments
Hi @naveenrnimmala! Could you help us to reproduce the issue by adding the testing instructions? Ideally, we need the whole path from the course creation to the student activity that was before and at the moment of the issue happened. Please, be as detailed as possible and consider attaching screenshots or video whenever you think it might help. Thank you! |
Did some testing with HPPS enabled as I was suspicious, but that doesn't appear to be the culprit. @naveenrnimmala @cskindley Do you have Sensei installed on a WordPress.com site or a self-hosted site? |
Self hosted. It was a foobarred installation of the TTF default theme.It was a theme issue I fixed by reinstalling. BUT the culprit is an “invalid json response” when trying to add pages via the editor.What really needs to happen is the automattic theme devs need a master reset for FSE default themes because just uninstalling and reinstalling does not remove it’s db entries.Scott ***@***.*** May 29, 2024, at 3:24 PM, Donna Peplinskie ***@***.***> wrote:
Did some testing with HPPS enabled as I was suspicious, but that doesn't appear to be the culprit.
@naveenrnimmala @cskindley Do you have Sensei installed on a WordPress.com site or a self-hosted site?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
My team found the issue: Line 6 is missing the type attribute:
And the entire block needs a title:
|
Thank you so much. I was almost planning to redo my site with another LMS. |
Sharing what I've found so far... I still haven't been able to reproduce this issue, and I'm not seeing how this could have anything to do with it. I will admit though that that is incorrectly formatted block JSON, which I'll resolve in a separate issue. While trying to debug this further, I noticed in the log file provided here that Although it's unclear how to arrive in a state where I'll open a PR for this soon. |
This is from woocommerce status logs. Am getting critical errors during course browsing.
Uncaught TypeError: Sensei_Assets::get_icon(): Argument #1 ($name) must be of type string, null given, called in /home/public_html/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php on line 283 and defined in /home/public_html/wp-content/plugins/sensei-lms/includes/class-sensei-assets.php:310 CONTEXT: {"error":{"type":1,"file":"/home/public_html/wp-content/plugins/sensei-lms/includes/class-sensei-assets.php","line":310},"backtrace":["","#0 /home/public_html/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php(283): Sensei_Assets->get_icon()","#1 /home/public_html/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php(266): Sensei\Blocks\Course_Theme\Course_Navigation->lesson_status_icon()","#2 /home/public_html/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php(168): Sensei\Blocks\Course_Theme\Course_Navigation->render_lesson()","#3 [internal function]: Sensei\Blocks\Course_Theme\Course_Navigation->Sensei\Blocks\Course_Theme\{closure}()","#4 /home/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php(166): array_map()","#5 /home/public_html/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php(100): Sensei\Blocks\Course_Theme\Course_Navigation->render_module()","#6 [internal function]: Sensei\Blocks\Course_Theme\Course_Navigation->Sensei\Blocks\Course_Theme\{closure}()","#7 /home/public_html/wp-content/plugins/sensei-lms/includes/blocks/course-theme/class-course-navigation.php(97): array_map()","#8 /home/public_html/wp-includes/class-wp-block.php(463): Sensei\Blocks\Course_Theme\Course_Navigation->render_course_navigation()","#9 /home/public_html/wp-includes/class-wp-block.php(443): WP_Block->render()","#10 /home/public_html/wp-includes/class-wp-block.php(443): WP_Block->render()","#11 /home/public_html/wp-includes/blocks.php(1705): WP_Block->render()","#12 /home/public_html/wp-includes/blocks.php(1743): render_block()","#13 /home/public_html/wp-includes/block-template.php(263): do_blocks()","#14 /home/public_html/wp-includes/template-canvas.php(12): get_the_block_template_html()","#15 /home/public_html/wp-includes/template-loader.php(106): include('/home/u76042662...')","#16 /home/public_html/wp-blog-header.php(19): require_once('/home/u76042662...')","#17 /home\/public_html/index.php(17): require('/home/u76042662...')","#18 {main}","thrown"]}
PHP / WordPress / Sensei LMS version
WP 6.5.2
PHP 8.2.13
Sensei 4.23.1
Browser / OS version
Screenshot / Video
Context / Source
The text was updated successfully, but these errors were encountered: