When visiting the setting page of the plugin after the activation of the plugin on Wordpress 5.7.1 you get the following error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in /var/www/wordpress/wp-content/plugins/wpckan/templates/settings.php on line 5 and exactly 2 expected in /var/www/wordpress/wp-admin/includes/template.php:1714 Stack trace: #0 /var/www/wordpress/wp-content/plugins/wpckan/templates/settings.php(5): do_settings_fields() #1 /var/www/wordpress/wp-content/plugins/wpckan/wpckan.php(208): include('/var/www/wordpr...') #2 /var/www/wordpress/wp-includes/class-wp-hook.php(292): wpckan->plugin_settings_page() #3 /var/www/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #4 /var/www/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action() #5 /var/www/wordpress/wp-admin/admin.php(259): do_action() #6 /var/www/wordpress/wp-admin/options-general.php(10): require_once('/var/www/wordpr...') #7 {main} thrown in /var/www/wordpress/wp-admin/includes/template.php on line 1714
The solution to this issue is to modify line 5 of wp-content/plugins/wpckan/templates/settings.php
from
<?php @do_settings_fields('wpckan-group'); ?>
to
<?php @do_settings_fields('wpckan-group', 'wpckan-group'); ?>
After this everything is working fine.
Committed the change here
Thank you for the great work.
When visiting the setting page of the plugin after the activation of the plugin on Wordpress 5.7.1 you get the following error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in /var/www/wordpress/wp-content/plugins/wpckan/templates/settings.php on line 5 and exactly 2 expected in /var/www/wordpress/wp-admin/includes/template.php:1714 Stack trace: #0 /var/www/wordpress/wp-content/plugins/wpckan/templates/settings.php(5): do_settings_fields() #1 /var/www/wordpress/wp-content/plugins/wpckan/wpckan.php(208): include('/var/www/wordpr...') #2 /var/www/wordpress/wp-includes/class-wp-hook.php(292): wpckan->plugin_settings_page() #3 /var/www/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #4 /var/www/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action() #5 /var/www/wordpress/wp-admin/admin.php(259): do_action() #6 /var/www/wordpress/wp-admin/options-general.php(10): require_once('/var/www/wordpr...') #7 {main} thrown in /var/www/wordpress/wp-admin/includes/template.php on line 1714The solution to this issue is to modify line 5 of wp-content/plugins/wpckan/templates/settings.php
from
<?php @do_settings_fields('wpckan-group'); ?>to
<?php @do_settings_fields('wpckan-group', 'wpckan-group'); ?>After this everything is working fine.
Committed the change here
Thank you for the great work.