Fatal error: Uncaught The notification type

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderators: mindphp, ผู้ดูแลกระดาน

User avatar
thatsawan
PHP VIP Members
PHP VIP Members
Posts: 27341
Joined: 31/03/2014 10:02 am
Contact:

Fatal error: Uncaught The notification type

Post by thatsawan »

Fatal error: Uncaught The notification type "notification.type.xxxx_xxxx" is missing from the file system. thrown in E:\xampp\htdocs\phpbb5\phpbb\notification\manager.php on line 947
User avatar
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
Posts: 25969
Joined: 22/09/2008 6:18 pm
Contact:

Re: Fatal error: Uncaught The notification type

Post by mindphp »

ทำอะไร ยังไง ไป ขอที่มาที่ไป หน่อยครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
User avatar
thatsawan
PHP VIP Members
PHP VIP Members
Posts: 27341
Joined: 31/03/2014 10:02 am
Contact:

Re: Fatal error: Uncaught The notification type

Post by thatsawan »

Code: Select all

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\InvalidArgumentException' with message 'The service definition "notification.type.notification.type.post_reply" does not exist.' in /opt/lampp/htdocs/phpbb6/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php:871 Stack trace: #0 /opt/lampp/htdocs/phpbb6/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php(478): Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('notification.ty...') #1 /opt/lampp/htdocs/phpbb6/phpbb/di/service_collection.php(66): Symfony\Component\DependencyInjection\ContainerBuilder->get('notification.ty...') #2 /opt/lampp/htdocs/phpbb6/phpbb/notification/manager.php(945): phpbb\di\service_collection->offsetGet('notification.ty...') #3 /opt/lampp/htdocs/phpbb6/phpbb/notification/type/base.php(133): phpbb\notification\manager->get_notification_type_id('notification.ty...') #4 /opt/lampp/htdocs/phpbb6/phpbb/notification/mana in /opt/lampp/htdocs/phpbb6/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 871 
'


error จริงๆ ของมัน น่าจะเกิดจาก service.yml
User avatar
thatsawan
PHP VIP Members
PHP VIP Members
Posts: 27341
Joined: 31/03/2014 10:02 am
Contact:

Re: Fatal error: Uncaught The notification type

Post by thatsawan »

ได้ เเล้ว เย้ๆ
ปัญหา ผิดที่ YML

xxxx.m_notifications.notification.type.reply_notifications:

Code: Select all

    xxxx.m_notifications.notification.type.reply_notifications:
        class: xxxx\m_notifications\notification\reply_notifications
        scope: prototype # scope MUST be prototype for this to work!
        arguments:
ไฟล์ notification > reply_notifications.php

Code: Select all

/**
     * Get notification type name
     *
     * @return string
     */
    public function get_type() {
        
        return 'notification.type.post_reply';
    }




วิธีแก้ไข



notification.type.post_reply:

Code: Select all

notification.type.post_reply:
        class: mdsoft\m_notifications\notification\reply_notifications
        scope: prototype # scope MUST be prototype for this to work!
        arguments:
            - @user_loader
            - @dbal.conn
            - @cache.driver
            - @user
            - @auth
            - @config
            - @controller.helper
            - %core.root_path%
            - %core.php_ext%
            - %tables.notification_types%
            - %tables.notifications%
            - %tables.user_notifications%
        tags:
            - { name: notification.type } 
Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Programming - PHP”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 20 guests