-
AuthorPosts
-
June 21, 2018 at 12:52 am #975588
I have increased the memory limit to 512M and the script time to 120.
I only get this problem when I installed certain plugins and try and logout of the backend. I then can’t log back in (front end still works ok) so I have to disable the plugins via ftp. I have asked my host to check this and they cam back with the following….“I’ve checked the error logs for your hosting account and these seem to be caused by the site’s theme:
PHP Warning: scandir(/home/cluster-sites/5/o/omniaelectrical.com/public_html/wp-content/uploads/avia_instagram_cache/): failed to open dir: No such file or directory in /home/cluster-sites/5/o/omniaelectrical.com/public_html/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 3019: /home/cluster-sites/5/o/omniaelectrical.com/public_html/wp-cron.phpPHP Warning: scandir(): (errno 2): No such file or directory in /home/cluster-sites/5/o/omniaelectrical.com/public_html/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 3019: /home/cluster-sites/5/o/omniaelectrical.com/public_html/wp-cron.php”
June 21, 2018 at 8:37 am #975684Hey ricweb0,
Can you give us admin and ftp access? so we can check it further.
Just post the details in private content so it’s only visible to the moderators.Best regards,
NikkoJune 23, 2018 at 12:21 am #976516Reporting the exact same errors being logged with Enfold 4.4.1.
June 23, 2018 at 1:05 am #976519Details attached
June 23, 2018 at 9:02 am #976853Hi ricweb0,
Can you try setting the uploads folder with 755 permission?
Also try creating a folder under uploads and rename it to: avia_instagram_cacheBest regards,
NikkoJune 23, 2018 at 10:42 am #976873The uploads folder already had 755 permission.
New folder createdJune 24, 2018 at 8:39 pm #977199Hi,
Can we please have FTP access also?
Best regards,
BasilisJune 24, 2018 at 10:24 pm #977228If you compare class-framework-widgets.php, this was added in 4.4.1. It was not present in 4.4. This is the cause of the error.
Line 3020:if( ! is_array( $cache_dirs ) ) { /** * Something went wrong reading directory - folder does not exist, access denied, ..... * There is nothing we can do. */ return; }
June 25, 2018 at 12:56 am #977260I can’t give you the ftp I’m afraid.
I can make amendments if you tell me what.Mathew have you solved your problem?
June 25, 2018 at 5:05 pm #977570Yes I solved the error, but the root cause of the error needs to be addressed by Kriesi developers.
Here’s what I did:
Key point for Kriesi. I am not using the Enfold Instagram widget, nor do I plan to or have every used it on this site.
For testing purposes I placed the Enfold Instagram widget in a sidebar and enabled it on a page. With the default settings of the widget, the cache folder is not created. Changing and saving the widget settings “Location of your photos or videos:” to “Cache on your server…”, the avia_instagram_cache folder is immediately created in the uploads folder.I removed the widget after, since I am not using Instagram. The folder IS removed after removing the widget, so we are back to square one.
The only way to resolve it is to manually create the folder.
Regardless, this needs to be fixed. If you are not using this feature/widget, there’s no need to create a cache folder. There need to be a check in place.
June 26, 2018 at 2:55 am #977745Hi,
The warning should not display when an instagram widget is not active. You probably saw that warning when the instagram widget’s cronjob was running. Did you happen to add the instagram widget before? That folder will not be created if the widget was not added.
Best regards,
IsmaelJune 27, 2018 at 1:41 am #978210Still no fix for this? Its driving me insane. Only causes problems when logging in and out. Its an issue because I want to run a ticket plugin that will require log in and out from clients….
June 27, 2018 at 5:10 pm #978496Hi,
This filter will delete the widget’s cache entry in the database.
add_action('wp_head', function() { delete_option('avia_instagram_widgets_cache'); });
Just add it in the functions.php file and then refresh the site a few times. Make sure that the instagram widget is not active.
You can also use the following plugin but let’s try the above code first..
// https://wordpress.org/plugins/wp-sweep/
Best regards,
IsmaelJune 27, 2018 at 11:50 pm #978617Tried the code. It just makes the website a blank page
June 29, 2018 at 11:13 am #979259Hi,
The same filter works on my end. Please copy it directly from the forum and not from your email.
Best regards,
IsmaelJune 29, 2018 at 10:04 pm #979476Ok Ive done that. Im guessing that the functions.php is in the theme folder?
Still get internal server error. Its something to do with the admin Im sure because it happens when I try and log out and sometimes when I try and log back in.
I can log in no problem using the awesome support login page. But the only way to log out is the admin bar at the top.
June 29, 2018 at 10:24 pm #979479or is it the functions-enfold.php ?
June 30, 2018 at 8:23 pm #979629The custom function you provided does not resolve the issue.
However I stumbled upon this other thread. It looks like it’s a cron job causing the error.
Taking it a bit further, I installed WP Crontrol. In the list of Cron Events, is ‘av_instagram_scheduled_filecheck’. It is scheduled to run every 2 hours. If I manually run the job, the error occurs.
To resolve the issue, the above mentioned article provides steps to remove the cron job from class-framework-widgets.php. However this will not survive an update to Enfold.
So perhaps we need a custom function to remove the cron job OR better yet, fix the issue.
BTW. You can delete the cron job in WP Crontrol.
July 2, 2018 at 6:33 am #979941Hi,
However I stumbled upon this other thread. It looks like it’s a cron job causing the error.
Yes, it is the cronjob that’s causing the issue as was mentioned earlier. That cronjob will only be initiated when you add an instagram widget. You can disable cronjob completely by adding this code in the wp-config.php file..
define('DISABLE_WP_CRON', true);
Or use this hook in the functions.php file to disable a specific cronjob.
add_action('init', function() { wp_clear_scheduled_hook( 'av_instagram_scheduled_filecheck' ); });
Best regards,
IsmaelJuly 2, 2018 at 7:20 am #979956Ismael,
I already tried the wp_clear_schedule_hook. The result of it clears the schedule, as expected. All this does is resets the next run time to 2 hours. Every time you refresh the /wp-admin page it resets the schedule.
I tried using WP Crontrol to delete the cron job, however it immediately reappears. So there’s something in-place that checks for the job and if it not present, it adds it. Like I mentioned before, I am not using the widget anywhere and it still adds the cron job.
I don’t want to disable WP-Cron entirely with a define statement. This will stop the delete_expired_transients cron job in WP.
For now, I am going to remove the cron job at the source until the issue is resolved, as mentioned in the other thread.
July 2, 2018 at 7:54 am #979972Ismael,
As a test, I built a fresh local install of WP 4.9.6 with Enfold 4.4.1 in MAMP. Absolutely nothing else installed.
The cron job is immediately created in the database under the wp-options/cron table as soon as the site is accessed.
Working backwards, I did the same clean install with Enfold 4.4. The cron job is created. A clean install of Enfold 4.3.1. The cron job is NOT created.
There’s a keep-alive for the cron job starting on line 2253 of class-framework-widgets.php. If I comment out lines 2257 &2262, I can delete the cron job and it does not reappear.
This is my work-around until the issue is fixed.
July 3, 2018 at 4:15 am #980370Hey!
Thanks for the info. I think I found a possible solution. You can use this filter to disable the cronjob from restarting.
add_filter('avf_instagram_activate_cron', 'avf_instagram_disable_cron', 10); function avf_instagram_disable_cron() { return false; }
The “activate_cron” property is set to true by default or when the WP_CRON is not disabled.
Regards,
IsmaelJuly 3, 2018 at 4:27 am #980373Ismael,
The above filter works. Thanks for your persistence.
Some notes on it. It removes the action ( avia_instagram_widget->handler_scheduled_filecheck() ) of the cron job, but does not delete it, which is OK. No action equals do nothing.
I manually deleted the cron job and it did not recreate it, so we have success.Again, thanks.
July 3, 2018 at 6:45 am #980403July 3, 2018 at 9:15 am #980459Great. So can you clarify what I need to do?
Can this be fixed in a theme update?July 4, 2018 at 2:19 am #980839Hi,
Add this filter in the functions.php file to disable the widget’s cronjob.
add_filter('avf_instagram_activate_cron', 'avf_instagram_disable_cron', 10); function avf_instagram_disable_cron() { return false; }
Best regards,
IsmaelJuly 4, 2018 at 8:11 am #980972I still have the same problems. Logging out causes the internal server error. And also when I clicked on ‘Get New Password’. (Which didn’t send me an email when it appeared to work)
You have a login so try it a few times in succession. Its as if the server can’t cope with the request which is why I contacted them first but they say its an error in the theme….
July 5, 2018 at 11:24 am #981520 -
AuthorPosts
- You must be logged in to reply to this topic.