Q - How to fix yaml file error in phpBB3 custom extension ?
โพสต์แล้ว: 04/11/2024 3:53 pm
I've (1) created phpBB 3 extension named "m_example",
(2) extract in "ext" folder
(3) Go to ACP > Customize and click on "Enable"
(4) After that, if I go to any page of the board, it displays the following error
Screenshot:
The generated "routing.yml" file code is
"phpbb_3\ext\mindphp\m_example\config\routing.yml"
How can I fix it ?
version - phpBB 3
(2) extract in "ext" folder
(3) Go to ACP > Customize and click on "Enable"
(4) After that, if I go to any page of the board, it displays the following error
โค้ด: เลือกทั้งหมด
Fatal error: Uncaught InvalidArgumentException: The definition of "m_example_main" in "C:\xampp\htdocs\phpbb_3\ext/mindphp/m_example/config/routing.yml" must be a YAML array. in C:\xampp\htdocs\phpbb_3\vendor\symfony\routing\Loader\YamlFileLoader.php:203 Stack trace: #0 C:\xampp\htdocs\phpbb_3\vendor\symfony\routing\Loader\YamlFileLoader.php(88): Symfony\Component\Routing\Loader\YamlFileLoader->validate(NULL, 'm_example_main', 'C:\\xampp\\htdocs...') #1 C:\xampp\htdocs\phpbb_3\vendor\symfony\config\Loader\DelegatingLoader.php(40): Symfony\Component\Routing\Loader\YamlFileLoader->load('ext/mindphp/m_e...', 'yaml') #2 C:\xampp\htdocs\phpbb_3\phpbb\routing\router.php(116): Symfony\Component\Config\Loader\DelegatingLoader->load('ext/mindphp/m_e...', 'yaml') #3 C:\xampp\htdocs\phpbb_3\phpbb\routing\router.php(261): phpbb\routing\router->get_routes() #4 C:\xampp\htdocs\phpbb_3\phpbb\routing\router.php(246): phpbb\routing\router->create_dumped_url_generator() #5 C:\xampp\htdocs\phpbb_3\phpbb\routing\router.php(168): phpbb\routing\router->get_generator() #6 C:\xampp\htdocs\phpbb_3\phpbb\routing\helper.php(148): phpbb\routing\router->generate('phpbb_help_faq_...', Array, 1) #7 C:\xampp\htdocs\phpbb_3\phpbb\controller\helper.php(212): phpbb\routing\helper->route('phpbb_help_faq_...', Array, true, false, 1) #8 C:\xampp\htdocs\phpbb_3\includes\functions.php(4050): phpbb\controller\helper->route('phpbb_help_faq_...') #9 C:\xampp\htdocs\phpbb_3\tools_resistor_calculator.php(688): page_header('Resistor Color ...', false) #10 {main} thrown in C:\xampp\htdocs\phpbb_3\vendor\symfony\routing\Loader\YamlFileLoader.php on line 203
The generated "routing.yml" file code is
"phpbb_3\ext\mindphp\m_example\config\routing.yml"
โค้ด: เลือกทั้งหมด
m_example_main:
path: /mextension
defaults: { _controller: mindphp.m_example.controller.main_controller }
version - phpBB 3