Automattic / sensei

Sensei LMS - Online Courses, Quizzes, & Learning
https://senseilms.com
GNU General Public License v2.0
525 stars 195 forks source link

Critical error Uncaught TypeError: Sensei_Assets::get_icon() #7594

Open naveenrnimmala opened 3 months ago

naveenrnimmala commented 3 months ago

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

merkushin commented 3 months ago

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!

cskindley commented 2 months ago

I get same.

fatal-errors-2024-05-12.log SystemStatusReport_medicalsolutions.completecpr.com_2024-05-12T06-13-01.txt

donnapep commented 1 month ago

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?

cskindley commented 1 month ago

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: @.***>