stefopl
Forum Replies Created
-
Forum: Plugins
In reply to: [Max Mega Menu] mega menu problem save stylIt is possible that the max_input_vars limit has been exceeded, which may result in some settings being lost during submission. If too many fields are sent, PHP truncates them silently, leading to missing values and errors.
Steps to Reproduce:
Set max_input_vars = 120 in your PHP configuration.Navigate to Mega Menu > Menu Themes or visit /wp-admin/admin.php?page=maxmegamenu_theme_editor directly.
Click Save.
You will see the following error:
Error saving theme. Please try refreshing the page.
Warning: CSS compilation failed. Please check your changes or revert the theme.
Undefined variable $responsive_breakpoint: line: 177, column: 5
Call Stack: #0 mixin desktop (unknown file) on line 315Recommended Solution:
Increase max_input_vars in php.ini, .htaccess, or wp-config.php to prevent truncation.To avoid silent data loss, a good practice is to add a validation field at the end of the form (e.g., validation_token). After submission, the plugin should verify whether this field is present in $_POST or $_GET. If it is missing, it likely means that max_input_vars has been exceeded, and the plugin can display a clear warning to the user.
This approach helps users diagnose the issue more easily and prevents unexpected errors.
Forum: Plugins
In reply to: [Max Mega Menu] mega menu problem save stylIt is possible that the max_input_vars limit has been exceeded, which may result in some settings being lost during submission. If too many fields are sent, PHP truncates them silently, leading to missing values and errors.
Steps to Reproduce:
- Set max_input_vars = 120 in your PHP configuration.
- Navigate to Mega Menu > Menu Themes or visit /wp-admin/admin.php?page=maxmegamenu_theme_editor directly.
- Click Save.
- You will see the following error:
Error saving theme. Please try refreshing the page.
Warning: CSS compilation failed. Please check your changes or revert the theme.
Undefined variable $responsive_breakpoint: line: 177, column: 5
Call Stack: #0 mixin desktop (unknown file) on line 315
Recommended Solution:
Increase max_input_vars inphp.ini,.htaccess, orwp-config.phpto prevent truncation.To avoid silent data loss, a good practice is to add a validation field at the end of the form (e.g.,
validation_token). After submission, the plugin should verify whether this field is present in$_POSTor$_GET. If it is missing, it likely means that max_input_vars has been exceeded, and the plugin can display a clear warning to the user.This approach helps users diagnose the issue more easily and prevents unexpected errors.
- This reply was modified 1 year, 2 months ago by stefopl.