Bug #6571
closed
on forum reply: php fatal error
0%
Description
When replying on a forum topic: the topic previewer iframe renders a php fatal error:
Fatal error: Call to undefined method common\libraries\Theme::get_content_object_image() in /home/kmoerman/Code/chamilo-dev/repository/content_object/forum/php/lib/complex_display/component/topic_previewer.class.php on line 235
Call Stack:
0.0002 675888 1. {main}() /home/kmoerman/Code/chamilo-dev/index.php:0
0.3170 17386336 2. common\libraries\Application::launch() /home/kmoerman/Code/chamilo-dev/index.php:87
0.3232 18672064 3. application\weblcms\WeblcmsManagerCourseViewerComponent->run() /home/kmoerman/Code/chamilo-dev/common/libraries/php/shared/application.class.php:777
0.5523 23098312 4. application\weblcms\Tool::factory_and_launch() /home/kmoerman/Code/chamilo-dev/application/weblcms/php/lib/weblcms_manager/component/course_viewer.class.php:122
0.5529 23177504 5. common\libraries\SubManager::launch() /home/kmoerman/Code/chamilo-dev/application/weblcms/php/lib/tool/tool.class.php:154
0.5570 23923176 6. application\weblcms\tool\forum\ForumToolViewerComponent->run() /home/kmoerman/Code/chamilo-dev/common/libraries/php/shared/sub_manager.class.php:340
0.5773 27632960 7. repository\ComplexDisplay::launch() /home/kmoerman/Code/chamilo-dev/application/weblcms/tool/forum/php/lib/component/viewer.class.php:59
0.5776 27714656 8. repository\ComplexDisplay::launch() /home/kmoerman/Code/chamilo-dev/repository/php/lib/complex_display/complex_display.class.php:115
0.5776 27715000 9. common\libraries\SubManager::launch() /home/kmoerman/Code/chamilo-dev/repository/php/lib/complex_display/complex_display.class.php:110
0.5890 28440080 10. repository\content_object\forum\ForumComplexDisplayTopicPreviewerComponent->run() /home/kmoerman/Code/chamilo-dev/common/libraries/php/shared/sub_manager.class.php:340
0.6129 30578056 11. repository\content_object\forum\ForumComplexDisplayTopicPreviewerComponent->get_posts_table() /home/kmoerman/Code/chamilo-dev/repository/content_object/forum/php/lib/complex_display/component/topic_previewer.class.php:133
0.6137 30615336 12. repository\content_object\forum\ForumComplexDisplayTopicPreviewerComponent->create_posts_table_content() /home/kmoerman/Code/chamilo-dev/repository/content_object/forum/php/lib/complex_display/component/topic_previewer.class.php:155
Files
Updated by Anonymous over 9 years ago
a related error: similar function function Theme :: get_content_object_image_path() gets called from common/extensions/external_repository_manager/implementation/mediamosa/php/lib/manager/component/group_quota_browser.class.php, but does not exist in the Theme class
Updated by Anonymous over 9 years ago
update: second error was already commented out.
resolved: changed attachment rendering in topic_previewer.php to:
$message .= '<li><a href="#" onClick="' . $url . '">' . '<img src="' . $attachment->get_icon_path(Theme :: ICON_MINI) . '" alt="' . htmlentities( Translation :: get(ContentObject :: type_to_class($attachment->get_type()) . 'TypeName') ). '"/> ' . $attachment->get_title() . '</a></li>';
and added use repository\ContentObject; to the preamble