Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #997711

    Hello,

    I am using Enfold v 4.0.7 with child theme.
    Today I wanted to update to latest Enfold theme which is 4.4.1

    After update I see a huge black area above the header with my site menus without css..
    I am attaching the screenshot of the problem.

    When I revert back to version 4.0.7 and activate child theme, everything goes back to normal.
    I am not very experienced in coding so I need your help in figuring out what my problem is and how I can fix it..

    Screenshot of the problem

    Thank you
    Enis

    #997829

    Hey Enis,
    Thank you for the images, First please explain how you updated, via ftp?
    If so, please note that overwriting the theme files will cause errors because old files will be left behind. You would need to delete the enfold parent theme folder and then upload the new enfold folder.

    If this is not the case then:
    I see in your child theme you have a copy of avia.js which would be from v4.0.7 and could conflict with the newer version. When you took the screenshot above was the child theme activate?
    Typically the only reason to add a file to the child theme is because there are customizations made to it, what changes were made to yours?

    Did you restore your site with a backup? If so, please try exporting your theme settings at Enfold Theme Options > Import/Export > Export Theme Settings File
    and then install the new version of the enfold parent theme, and import your theme settings.
    Then please check that the Enfold Theme Options > Performance > Disable Template Builder Elements > Always load all elements is set, and Enfold Theme Options > Performance > JS & CSS file merging and compression is disabled, then check your site.
    This should look like your child theme without activating it.

    Doing this will ensure the custom files in your child theme are not causing the error.
    Let us know if you still have the error, and restore your site so you won’t lose visitors.

    If you still have this issue, please check your webhost to see if you have the one click staging site option, this is a option in most cPanels to create a staging clone of your site so we can test on it and you site will stay up and running. You can always ask your webhost to help you with setting this up if you want.
    Here are some screenshots of what it would look like:
    staging-1
    staging-2

    Best regards,
    Mike

    #997900
    This reply has been marked as private.
    #997936

    Hi,
    Thank you for creating the staging site, I activated the Enfold v4.4.1 theme and it seems to be working correctly now, Please clear your browser cache and check.

    The only difference now is that the old child theme “avia.js” and the child theme custom “slideshow_fullscreen.php” is not loaded
    these may have been the conflict because we have made many changes to Enfold and these files since your version.
    Perhaps the changes to these files was to fix small bugs from a long time ago, and are no longer needed.
    Please compare this site to your live site for anything different, and let us know.

    Best regards,
    Mike

    #997937

    Hello Mike,

    I was also trying to figure out the problemç I did not think that you are already working on the staging site at the moment.
    I also clicked UPDATE in the theme screen and now the staging website gives fatal error..

    Fatal error: Cannot redeclare icl_post_languages() (previously declared in /home/istanb10/public_html/staging/wp-content/themes/enfold-child/functions.php:15) in /home/istanb10/public_html/staging/wp-content/themes/enfold/functions.php on line 726

    #997939

    I was looking for other threads and one of the moderator’s solution was to add this line:

    /*enfold 4.4.1 update sonrası menu problemi i.in eklendi.*/
    @media only screen and (min-width: 768px) and (max-width: 989px) {
    .responsive #top #wrap_all .av_mobile_menu_tablet .main_menu { 
    right: 30px !important } 
    }
    /*enfold 4.4.1 update sonrası menu problemi i.in eklendi.*/
    

    instead of this :

    @media only screen and (min-width: 768px)  {
    .slider-desktop {
      display:block !important;
    }
    .slider-phone {
      display:none !important;
    }
    }
    
    @media only screen and (max-width: 767px)  {
    .slider-desktop {
      display:none !important;
    }
    .slider-phone {
      display:block!important;
    }
    

    So I did that and uploaded style.css into my enfold child theme folder..
    do you think this created the fatal error?

    I am really sorry I didnt think you would respond that quick to my problem..

    #998193

    Hi,

    No, a fatal error is not create by that.
    To solve the fatal error although it is because of some code in functions.php of the child theme, if you activate main theme instead of child theme all should work properly.

    Best regards,
    Basilis

    #998196

    Hello Basilis,

    Thank you for your response but I can not access to my admin page because I keep getting the error:

    Fatal error: Cannot redeclare icl_post_languages() (previously declared in /home/xxxx/public_html/staging/wp-content/themes/enfold-child/functions.php:15) in /home/istanb10/public_html/staging/wp-content/themes/enfold/functions.php on line 726

    #998199

    Hello again Basilis,

    OK I was able to acces my website and activated the main theme. Now the site is working..
    But does this mean I am not using the child theme at the moment?

    I want to use the child theme because I am making lots of css changes and I want to keep these changes every time I update the main theme.
    It has been quite long since I updated the theme. I was using version 3.8 before.

    Do you think working with child theme is still a good option or do I not need child theme anymore?

    Thank you
    Enis

    #998262

    Hi,
    I recommend using a child theme, and after we sort out your issue we will modify the child theme for you to use.
    Right now the goal with the staging site to determine the cause of the black error at the top of your page, which I believe is due to your child theme having a old copy of “avia.js” loading.

    Once you have a chance to text your staging site working with just the parent theme, that is the latest enfold, I will recommend removing the “avia.js” and the custom ‘slideshow_fullscreen.php’ from your child theme and activating it for you to test for errors and verify it is running correctly.

    The you will be able to do the same for your live site with confidence.

    Best regards,
    Mike

    #998358

    Hello Mike,

    I removed the “avia.js” and the custom ‘slideshow_fullscreen.php’ from my child theme and activated the child theme..
    The I uploaded these 2 files one by one and figured that it is avis.js inside child theme is the reason of having a black non-css area above the header..
    But I do not know what is causing the problem in avia.js. I replaced avis.js with the original file from enfold 4.4.1
    Now everything seems ok. But I do not remember what I changed in avia.js before so that I put that into child theme folder..
    Is it possible to find out that?

    Thank you very much.

    Kind Regard,
    Enis

    • This reply was modified 6 years, 3 months ago by indurango.
    #998423

    Waiting for your recommendations about what to do.
    Thanks.

    • This reply was modified 6 years, 3 months ago by indurango.
    #998592

    Hello again,

    I tried to do the same thing I did in staging site on my live website..
    I removed avis.js and slideshow_fullscreen.php and then activated child theme but the problem still exists..
    I cleaned cache, I removed enfold and re-isntalled it but still same…

    #998608

    Hi,
    It is great news that you found out that it was the avis.js causing the issue.
    I can try to compare your modified avis.js with the v4.0.7 version to determine what you were trying to do back then.
    Once we know that, you will be able decide if you want the add the modifications to the current version.
    Please upload the modified file via Dropbox or Google Drive so I can compare, I have a copy of v4.0.7 to work with.

    In your last post you indicated that your live site has the error, even though you removed to custom files. I have checked and don’t see the error, so I assume you have corrected the issue, or the server cache has been cleared?

    Best regards,
    Mike

    #999363

    Hello Mike,

    In the live website you do not see the error because I activated the main theme so the visitors do not see the problem.
    So the Child theme is inactive currently.

    I have uploaded avia.js to google drive.. here is the link :
    https://drive.google.com/open?id=1vdMw3oXRO3QDyoJXfXVZcfJOr_8kocZh

    But I do not know why the problem still exist even I remove avia.js from child theme folder…

    Kind regards,
    Enis

    #999721

    Hi Enis,

    The staging website looks good on my end. Did you manage to get it working or do you need more help?

    Best regards,
    Victoria

    #999725

    Hello Victoria,

    Yes I still need help.

    The staging website works fine..
    But the problem exists in the live website. In the live website, I did exactly what I did in staging site..
    First I removed all js and shorcode php files inside my child theme folder.
    And then I started to upload them again one by one checking if the problem occurs..
    When I uploaded avia.js the site gave error.. SO I copied avia.js from main theme (latest version) to my child theme and the problem disapperared..

    But when I did this in my live website it does not matter..
    I clean my cache many time also..

    What can be the problem?
    You have my website access information already including staging site and http://ftp..
    So please feel free to check it..

    I would be really happy if you can help me about this.

    Kind regards,
    Enis

    #999821

    Hi,
    I tried to recreate the issue on my localhost and found the issue was with the function that called the child theme avia.js file, replacing yours:

    
    function wp_change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );

    with this:

    function add_my_script() {
      wp_enqueue_script( 'my-custom-script', get_stylesheet_directory_uri() . '/js/avia.js', array('jquery'), '1.0.1', true );
    }
    add_action( 'wp_enqueue_scripts', 'add_my_script', 10);

    removed the error no matter which version of avia.js was used, on your live site and my localhost.
    So right now on your live site the child theme is active with the newer avia.js and there is no error.
    I recommend using the new avia.js because a lot has changed in it since v4.0.7. When I compared yours to the standard v4.0.7 a lot of functions were missing, but none were added, I believe that you might have been using an even older version.

    Best regards,
    Mike

    #999888

    Hello Mike,

    Thank you for solving my problem. I really appreciate it..

    My question is; you said the child theme now active with the newer avia.js. So I do not need to do anything at the moment because you place the newest avia.js . am I right?

    Thank you,
    Kind regards,
    Enis

    #1000070

    Hi,
    This is correct. We will leave this thread open for now so you can test. Please let us know once you are fully satisfied and we can close the thread.

    Best regards,
    Mike

    #1000222

    Hello Mike,

    Yes the problem is gone..
    I have one more question.. Can you please tell me what this change in the code mean? I mean what does the code piece does?

    Kind regards,
    Enis

    #1000277

    Hi,
    It tells the theme to use your child theme avia.js file.
    Note, in my haste, I posted the incomplete code here, I have since corrected.
    The error in the old script was ‘wp_print_scripts’ which should have been ‘wp_enqueue_scripts’
    But as you are using the same avia.js as the parent theme, and I assume have no planned changes for it, I would recommend removing this all together so any improvements to it with upcoming updates will take effect.
    If in the future you wish to customize avia.js, then this is how you would do it.

    Best regards,
    Mike

    #1464111

    Hi, I don’t know if I’m having some kind of this problem after the latest updates of the theme and WordPress, my header has disappeared, just black, my footer has disappeared and the pages are a complete mess. Everything was working fine until a couple of days ago

    #1464133

    Hi BlueSolution,

    Please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.

    Best regards,
    Rikard

Viewing 24 posts - 1 through 24 (of 24 total)
  • The topic ‘Enfold header menu problems after updating to latest Enfold theme’ is closed to new replies.