Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #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.php

    PHP 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”

    #975684

    Hey 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,
    Nikko

    #976516

    Reporting the exact same errors being logged with Enfold 4.4.1.

    #976519

    Details attached

    #976853

    Hi ricweb0,

    Can you try setting the uploads folder with 755 permission?
    Also try creating a folder under uploads and rename it to: avia_instagram_cache

    Best regards,
    Nikko

    #976873

    The uploads folder already had 755 permission.
    New folder created

    #977199

    Hi,

    Can we please have FTP access also?

    Best regards,
    Basilis

    #977228

    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;
    			}
    
    #977260

    I can’t give you the ftp I’m afraid.
    I can make amendments if you tell me what.

    Mathew have you solved your problem?

    #977570

    @ricweb0

    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.

    #977745

    Hi,

    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,
    Ismael

    #978210

    Still 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….

    #978496

    Hi,

    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,
    Ismael

    #978617

    Tried the code. It just makes the website a blank page

    #979259

    Hi,

    The same filter works on my end. Please copy it directly from the forum and not from your email.

    Best regards,
    Ismael

    #979476

    Ok 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.

    #979479

    or is it the functions-enfold.php ?

    #979629

    @Ismael,

    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.

    #979941

    Hi,

    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,
    Ismael

    #979956

    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.

    #979972

    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.

    #980370

    Hey!

    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,
    Ismael

    #980373

    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.

    #980403

    Hi,

    Awesome! Glad it worked!

    Thank you for using Enfold :)

    Best regards,
    Ismael

    #980459

    Great. So can you clarify what I need to do?
    Can this be fixed in a theme update?

    #980839

    Hi,

    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,
    Ismael

    #980972

    I 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….

    #981520

    Hi,

    I can’t seem to reproduce the issue when I try to log out of your site. I tried it a few times. Where can we see the “Get New Password” button?

    Best regards,
    Ismael

Viewing 28 posts - 1 through 28 (of 28 total)
  • You must be logged in to reply to this topic.