Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #970261

    Hi – the errors mentioned in this thread are back… I am running latest version of Enfold:

    https://kriesi.at/support/topic/lots-of-php-server-errors-class-framework-widgets-php-lines-3019-and-3020/

    Thanks,
    Rob

    Log in private content

    #971447

    Hey Rob,

    You are currently not using Instagram widget, is that correct? :)
    Could you please post WP admin logins privately?

    Best regards,
    Yigit

    #971461

    Hi Yigit!

    That is correct… posting logins to private content.

    Thanks!
    Rob

    #971741

    Hi,

    I tried updating the file from WP backend but it did not work. Could you please go to /wp-content/themes/enfold/framework/php/class-framework-widgets.php and replace its content with this one and check if that helps – https://pastebin.com/haBT2FWr ?

    Best regards,
    Yigit

    #971747

    Hi Yigit,

    I’m not sure why the editor in the backend no longer works… is it just my installation or is that a change WordPress made?

    SFTP credentials in private content so you can make the mods if you don’t mind and then make changes if we need to further modify….

    Best and thanks!
    Rob

    #971754

    Hi Rob,

    No it looks more like a connection issue between me and your server :)
    I tried logins but i am getting “The server’s host key has changed since your last connection. This is most likely due to a server change, but you should check with your server administrator to be sure. Click OK to accept the new host key.” error again and not able login :/

    Best regards,
    Yigit

    #971757

    Hey Yigit!

    Yes that’s standard for a new SFTP login on WP Engine for some reason… remember we went through this a few months ago? :) Just click “OK” and you’re in!

    Check private content please for new password….

    Best,
    Rob

    • This reply was modified 6 years, 3 months ago by goldengate415.
    #971765

    Hi,

    Clicking “OK” does nothing, just like few months ago so i double checked, tried port 22, restart Transmit (file transfer tool i am using) twice but none helped. I cannot remember how i logged in last time though

    Best regards,
    Yigit

    #971853

    Hi Yigit, I had same problem, fix is in private content, thanks!

    • This reply was modified 6 years, 3 months ago by goldengate415.
    #974733

    Hi,

    I had a look at your source files and error message:

    Please check themes\enfold\framework\php\class-framework-widgets.php line 3020:

    In the source file:

    
    if( ! is_array( $cache_dirs ) )
    

    which I added for 4.4.1 but your error message is:

    
     PHP Warning: array_diff(): Argument #1 is not an array in /nas/content/live/robwiley/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 3020
    

    which was in a previous version in this line. Now this is in line 3029.

    Did you clear your server caches?

    Best regards,
    Günter

    #974832

    Hi gunter!

    Thanks for checking. Yes, I did clear my server cache… and on the staging site above, there is no server cache.

    Is it possible I have a corrupted file? I have not pasted Yigit’s code above as I was thinking you guys could SFTP into the staging site (credentials above in private content) and make mods to see if errors go away, then I could make same changes on production side.

    Thanks,
    Rob

    #976347

    Hi Rob,

    Sorry for the late reply but I’m on holiday this week.

    Strange – I downloaded the file with ftp from your server (see private content). The code is correct in this file – as should be in 4.4.1.

    This is the code in the file that starts at line 3019 (it is a comment line):

    
    			/**
    			 * Now we check that all directories belong to a cache entry
    			 */
    			$cache_dirs = scandir( $this->upload_folders['instagram_dir'] );
    			if( ! is_array( $cache_dirs ) )
    			{
    				/**
    				 * Something went wrong reading directory - folder does not exist, access denied, .....
    				 * There is nothing we can do.
    				 */
    				return;
    			}
    

    I added the comment and the is_array check with 4.4.1.

    What is also a bit strange is the the “Permission denied” message: – upload_folders[‘instagram_dir’] points to the a subdir of standard WP upload directory which should be accessible.

    Best regards,
    Günter

    • This reply was modified 6 years, 3 months ago by Günter.
    #976398

    Hi Gunter, no worries, since this is not impacting front end I don’t consider this urgent but would like to get it fixed. Hope you are someplace nice for vacation.

    Do you think it’s a folders permissions issue? Seems like if it were, it would impact a lot more than this one line of code re the pesky Instagram widget? What do you suggest as next steps?

    Thanks,
    Rob

    #977359

    Hi Rob,

    Rechecking again ftp – the last modify date of the file framework\php\class-framework-widgets.php was 12.June – the error log is from 8.June.
    When did you updated the theme to 4.4.1 (before 8. June or after ?).

    Nevertheless I added a dir check to the file and uploaded the fix again (line 3022):

    
    
    			if( ! is_dir( $this->upload_folders['instagram_dir'] ) )
    			{
    				return;
    			}
    
    

    The file is correctly updated (checked with Apperance -> Editor)

    It seems, that your server is using old version 4.4 of this file.

    Please clear the error log and lets see, if the warnings and errors still occur.

    Maybe your hoster has some cache running and this did not recognise the update of the file ?

    Best regards,
    Günter

    #978009

    Hi Gunter! Thanks for continuing to look into this! There is some good news to report!

    To answer your question, I updated the theme just about when it came out… I think within a day.

    Lots of new errors in the server log on the production site, including some pretty scary warnings about the database. I’ll post them in private content. I also notice the staging site is running slower than normal, but not sure if that’s just “internet weather.” The GOOD NEWS is that the staging site error log is empty!!! Staging site content is very old so any fixes there I would need to make manually to production site.

    Please have a look at private content and advise your recommended next steps.

    Thanks and best,
    Rob

    #978727

    Since the errors are fixed on my staging site where you did the work, I just copied the file over to my production site.. I should know tomorrow if this fixes it. I think it will. Somehow the file may have not gotten updated in the last update… I usually don’t update via FTP but instead use the wordpress functionality since it seems much faster / less downtime to do it that way?

    Thanks!
    Rob

    #980588

    Hi Rob,

    Has replacing theme files on production site with the ones from staging helped?
    If not, could you please give us an update? :)

    Best regards,
    Yigit

    #980628

    Yes, that appeared to fix it…thanks!! So whatever Gunter did on the staging side to the enfold theme folders fixed it. Can that be incorporated in the next theme update so the errors don’t return?

    Thanks much for your help!!!
    Rob

    #980633

    Hi Rob,

    Günter already added the fix and it will be included in upcoming version :)

    Best regards,
    Yigit

    #980634

    Great, thanks! :)

    Best,
    Rob

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘PHP errors in server log’ is closed to new replies.