Tagged: [L]
-
AuthorPosts
-
October 3, 2018 at 10:46 am #1017437
Hi everyone,
Since the last update of enfold, when I have the file avia.js in my child theme, it breaks the burger menu.
Did you notice this bug ? Will you fix this in the next update ?
ThanksOctober 3, 2018 at 12:04 pm #1017488Hey Underkult,
Did you add any customisations to the file in question? If so then please try to remove them and add them to a fresh copy from the parent theme instead to see if that helps. If it works with out your customisations then they are likely the cause of your problems.
Best regards,
RikardOctober 3, 2018 at 2:36 pm #1017537Hi Rikard,
Thank you for you quick reply.
Even if I replace the file “avia.js” by exactly the same without any customisations, it causes the bug.
When I open the menu burger, the closing link is’nt working.
I notice this strange behaviour on several websites, thats why I thought it was beacause of you last updates.
Thank you for your time.October 3, 2018 at 3:22 pm #1017546Hi Rikard,
i use this method to replace avia.js :// Replace avia.js function 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_enqueue_scripts', 'change_aviajs', 100 );
Maybe it isn’t working because I made a mistake somewhere ?
October 4, 2018 at 7:07 am #1017719Hi,
Thanks for the update, where can we see the problem on an actual site? Please include admin login details to the site as well so that we can have a look at the backend.
Best regards,
RikardOctober 4, 2018 at 9:54 am #1017787This reply has been marked as private.October 4, 2018 at 11:31 am #1017836Hi,
Thanks for that, I wanted to comment out the code you referenced but the editor function looks to be removed on your installation. Could you try it out yourself maybe? What happens if you just run the default avia.js from the parent theme?
Also, it looks like you have done a lot of customisations to the theme in general so it might be a CSS problem. You might want to try to remove all your custom CSS temporarily as well to see if that makes any difference to the mobile menu behaviour.
Best regards,
RikardOctober 4, 2018 at 11:49 am #1017846Hi Rikard,
What is the editor function ? I never used that before.
If I run the default avia.js from the parent theme the burger menu run fine.
I tried to remove my css file with my customisations but it didn’t fix the menu’s bug.
I share my FTP logins if you want to look deeper in the files of the website.October 5, 2018 at 6:20 am #1018134Hi,
The editor function can be found under Appearance->Editor by default, but a lot of hosting providers turn that off to avoid non-developer from making edits to the code of the theme.
If the burger menu works fine with the default file then it’s very likely that your customisations are at fault. Maybe you could try to review the custom code to see if you can locate the problem?
Best regards,
RikardOctober 5, 2018 at 9:23 am #1018187Hi Rikard,
I already tried to remove all my customisations, css and scripts to see if the problem was caused by them but it didn’t.
I don’t understand why when I load the exactly same file from your theme in my child theme it isn’t working.
Best RegardsOctober 6, 2018 at 5:35 am #1018388Hi,
I’m not sure to be honest with you, but I’m guessing there is something wrong with the dequeue/enqueue function you are using. Could you try to only dequeue the default file to see if it actually works? All things depending on that file should fail if the dequeue actually works.
Best regards,
RikardOctober 8, 2018 at 9:56 am #1018883Hi Rikard,
You were right, If I only dequeue the default Avia.js , the burger menu works.
So here is my code in my functions file :function change_aviajs() { wp_dequeue_script( 'avia-default' ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
But it is working because the default file from Enfold theme is still loaded…
The following code isn’t working as well :
function change_aviajs() { wp_dequeue_script( 'avia-default' ); } add_action( 'wp_dequeue_scripts', 'change_aviajs', 100 );
October 8, 2018 at 7:52 pm #1019171Hi Underkult,
The two codes I see above are the same. Is it correct? Did you get it working for you?
Best regards,
VictoriaOctober 9, 2018 at 9:27 am #1019398Hi Victoria,
No it isn’t working. It is impossible to load a custom avia.js in a child-theme and have the burger menu working properly.October 9, 2018 at 12:28 pm #1019454Hi,
Thanks for the update. Please try this instead:
function wp_change_aviajs() { wp_deregister_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'wp_change_aviajs', 100 );
Best regards,
RikardOctober 9, 2018 at 2:08 pm #1019511Hi Rikard,
If I use your code, my burger menu works fine,
but the sliders and the video section doesn’t work.
Best RegardsOctober 10, 2018 at 5:19 am #1019756Hi,
Thanks for the update, are you seeing any error messages in the console if you inspect the page in your browser? Are you sure that the file you want to enqueue is placed in the search path specified in the code?
Best regards,
RikardOctober 10, 2018 at 11:02 am #1019870Hi Rikard,
When I inspect the console, I don’t see anything.
My file is placed at the right place in my child-theme.
Best RegardsOctober 15, 2018 at 6:59 am #1021427Hi,
What did you change in the avia.js file? Please get the latest copy of the avia.js file and then readd your modifications.
Best regards,
IsmaelOctober 16, 2018 at 10:43 am #1022093Hi,
I manage to add my modification in an other javascript file independently.
So the avia.js file is exactly the same than enfold’s.
I notice the bug on several websites so I think it is caused by your theme, not by my minor modifications.Best Regards
- This reply was modified 6 years, 1 month ago by Underkult.
October 16, 2018 at 1:54 pm #1022190Hi,
What is the name of the file? Can we take a look? This is the only error that I see in the console.
www-widgetapi.js:99 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://ebenisterie-loutan.ch').
Best regards,
IsmaelOctober 16, 2018 at 4:35 pm #1022252Hi Ismael,
I give the access for my FTP.
My file is named “cadre.js” and it is in the folder “js” in my child theme.Best Regards
October 17, 2018 at 4:34 am #1022528Hi,
The avia.js file in the child theme folder is still active.
// Replace avia.js 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 );
I thought you disabled it? Please get the latest version of the avia.js file and then redo the modifications.
Best regards,
IsmaelOctober 17, 2018 at 2:37 pm #1022778Hi Ismael,
The goal of this topic is to do minor modifications to avia.js in the child theme. Why I would disable it ?
I updated my website to the last version of Enfold and I replaced The avai.js of my child theme but the bug is still here.
Best RegardsOctober 17, 2018 at 4:05 pm #1022833October 17, 2018 at 5:02 pm #1022896Hi,
It is exactly the same, I didn’t add anything or modified the file.
I removed my customisations to show you the bug isn’t caused by them.
Best RegardsOctober 18, 2018 at 11:50 am #1023299Hi,
The mobile menu is working properly when the includes > helper-main-menu.php and the child theme’s avia.js files are disabled.
Best regards,
IsmaelOctober 18, 2018 at 12:02 pm #1023307Hi Ismael,
So are you telling me that we can’t modify avia.js with a child theme ?
It’s too bad, I use this fonctionality on many websites I build with Enfold.
I’m disappointed that you remove this option with you last updates.
Best RegardsOctober 19, 2018 at 10:59 am #1023826Hi,
You can modify the avia.js file but you have to make sure that you’re using the updated version.
Best regards,
IsmaelOctober 19, 2018 at 4:16 pm #1023994Hi Ismael,
I’m sure that I am using the right version.
I don’t understand why it is not working.
Best Regards -
AuthorPosts
- You must be logged in to reply to this topic.