Forum Replies Created
-
AuthorPosts
-
Ismael,
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.
Ismael,
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.
Ismael,
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.
The 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.
Yes 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.
If 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; }
Reporting the exact same errors being logged with Enfold 4.4.1.
-
AuthorPosts