Tagged: avia-head-scripts error
-
AuthorPosts
-
March 20, 2024 at 9:57 am #1437677
We’ve been informed that our server is working in limited mode due to the error:
WordPress database error Got a packet bigger than ‘max_allowed_packet’ bytes for query UPDATE
wp_options
SEToption_value
= ‘a:235194:{s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e14520f6\\”;s:21:\\”error-generating-file\\”;s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e38b54f4\\”;s:21:\\”error-generating-file\\” […]I tried to solve the issue:
Please go to Enfold theme options > Performance and enable “Show advanced options” then choose “Disable adding unique timestamp” option in “Unique timestamp of merged files”, disable “CSS and JS file merging and compression”, enable “Delete old CSS and JS files?” at the bottom and save theme options.
Doesn’t work
https://kriesi.at/documentation/enfold/optimization/#troubleshoot
Doesn’t help too
Tried these code snippets:
function whv_update_option_aviaAsset_avia_head_scripts($value, $old_value, $option) { /* * Enfold Error from 4.7.0 * * Enfold is writing in table options endless option_name aviaAsset_avia-head-scripts 'error-generating-file' ... * So web-side will slow down immense */ if (in_array('error-generating-file', $value)) { return $old_value; } else { return $value; } } add_filter( 'pre_update_option_aviaAsset_avia-head-scripts', 'whv_update_option_aviaAsset_avia_head_scripts', 10,3 ); function my_custom_merged_files_unique_id( $uniqid, $file_type, $data, $enqueued, $file_group_name, $conditions ) { return ''; } add_filter( 'avf_merged_files_unique_id', 'my_custom_merged_files_unique_id', 10, 6 );
Don’t have any results.
We are using the WP Rocket plugin. I’ve attempted to clear the cache consistently, tried all available combinations under Enfold’s ‘Show advanced options,’ disabled caching and other plugins, but none of these measures have resolved the issue.
Additionally, I reached out to our hosting support to disable DB caching, and currently, there is no database object caching active.
Could you please assist with this problem?
March 21, 2024 at 8:43 am #1437748Hey bmcinternet,
Thank you for the inquiry.
The error occurs due to the Enfold > Performance > File Compression settings. We recommend disabling the default compression options from the theme and use WP Rocket’s compression settings as an alternative.
Best regards,
IsmaelMarch 21, 2024 at 6:50 pm #1437811Hello, Ismael
No, current settings are “Disable – no file merging and compression” both for CSS and JS.
Moreover, as I mentioned above, we have also tried all possible settings for Merging and Compression, and we still have the error.
We also tried disabling WP Rocket and applied the PHP snippets mentioned above, but nothing has helped.
- This reply was modified 8 months ago by bmcinternet.
March 22, 2024 at 7:27 am #1437976Hi,
Thank you for the update.
The error should not occur when the Performance > File Compression settings are disabled because the theme will not generate, update, or retrieve the avia-head-scripts entry in the database. Please temporarily disable the compression options and the cache plugin, remove the snippets from the functions.php file, wait for a bit, make sure to purge the client and server cache, before testing it again.
Best regards,
IsmaelMarch 22, 2024 at 7:28 am #1437977Hi,
UPDATE: If the avia-head-scripts entry is already generated in the database, try to delete it manually. Make sure to create a backup of your site and database before proceeding.
Best regards,
IsmaelMarch 22, 2024 at 8:36 am #1437984OK, I’ll try.
Could you please tell me where I can find the avia_head_scripts in the WordPress database to delete them?March 23, 2024 at 9:14 pm #1438085March 25, 2024 at 10:14 am #1438255Hello
Thank you, but there is no matches even if I search for “avia_head”.
And we still have an error almost every minuteMarch 25, 2024 at 1:27 pm #1438275Hi,
To find the entry in database you can use the following SQL statement:
SELECT * FROM
wp_options
WHEREoption_name
like '%avia-head-script%'To remove all use:
DELETE FROM
wp_options
WHEREoption_name
like '%avia-head-script%'Best regards,
GünterMarch 25, 2024 at 5:34 pm #1438282Thank you for your reply, Günter, but the result is the same.
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0008 seconds.)
SELECT * FROM wp_options WHERE option_name like ‘%avia-head-script%’;March 26, 2024 at 8:45 am #1438328Hi,
Do you have access to the configuration (my.cnf or my.ini) of your database? If not, try asking your hosting provider to increase the value of the max_allowed_packet from 16MB, which is the default, to 32MB. This might fix the issue that you’re having with the merged scripts.
The error occurs because the theme is attempting to update the avia-head-script, but it exceeds the max_allowed_packet limit. If I am not mistaken, this should not happen if the compression option is disabled because the theme will neither update nor generate the avia-head-script. It’s quite odd that the issue still occurs even when the compression options are disabled.
You can also add this code in the functions.php file to delete the database entry:
<?php function ava_delete_head_scripts_option() { if ( get_option( 'aviaAsset_avia-head-scripts' ) !== false ) { delete_option( 'aviaAsset_avia-head-scripts' ); } } add_action( 'init', 'ava_delete_head_scripts_option' ); ?>
Refresh the page a few times, then remove the code from the functions.php file.
Best regards,
IsmaelMarch 27, 2024 at 2:34 pm #1438455Hello
We don’t have an access to the configuration of our database service and we already asked our your hosting provider to increase the value of the max_allowed_packet. It is now at maximum allowed size for our account and the issue doesn’t gone.
If I am not mistaken, this should not happen if the compression option is disabled because the theme will neither update nor generate the avia-head-script. It’s quite odd that the issue still occurs even when the compression options are disabled.
We have been struggling with these errors for weeks, and I hope you understand that this situation shouldn’t last forever.
You can also add this code in the functions.php file to delete the database entry:
function ava_delete_head_scripts_option() {Done, doesn’t help
- This reply was modified 7 months, 4 weeks ago by bmcinternet.
- This reply was modified 7 months, 4 weeks ago by bmcinternet.
March 27, 2024 at 2:36 pm #1438458Our MySQL variable max_allowed_packet is (25165824, 24 MB) now.
And we still have an error:WordPress database error Got a packet bigger than ‘max_allowed_packet’ bytes for query UPDATE
wp_options
SEToption_value
= ‘a:235194:{s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e14520f6\\”;s:21:\\”error-generating-file\\”;s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e38b54f4\\”;s:21:\\”error-generating-file\\”- This reply was modified 7 months, 4 weeks ago by bmcinternet.
March 28, 2024 at 8:02 am #1438520Hi,
We may need to access the site in order to check the issue further. Please set your installation to debug mode, provide the login details in the private field and make sure that the Appearance > Theme File Editor is active.
// https://wordpress.org/plugins/error-log-monitor/
// https://learn.wordpress.org/tutorial/debugging-in-wordpress/IMPORTANT: Please do not forget to create a site backup or restore point.
Best regards,
IsmaelApril 3, 2024 at 8:59 am #1439059Ismael, Günter,
The issue has been resolved, and it appears that the errors were generated by another site using the Enfold theme on our VPS. Therefore, we simply needed to apply your fixes to both sites simultaneously.
Thank you for your support.
April 3, 2024 at 5:47 pm #1439104Hi,
Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘The “avia-head-scripts” error persists despite trying all recommendations’ is closed to new replies.