Post buttons
-
Hello!
I noticed that the buttons just stopped working from day to day. I mean buttons ‘edit’, ‘quote’, ‘reply’, ‘report’, ‘delete’ (https://i.imgur.com/jcAdBGi.png), also when adding new answer, there’s message ‘are you sure to leave the page?’ (https://i.imgur.com/K4sm6hu.png).
-
Hi @xszejdi,
It’s either, you have JS error from active theme and plugins or you’ve installed some optimizer/minifier/chacher plugin which damaged wpForo JS files. You can find the problem maker plugin by deactivating all recent installed and updated plugins, delete all caches and check one by one.
And, please eave your forum URL to allow us debug JS errors.Hello @gvectors-team!
Thanks for quick reply, i’ll test recent plugins. My website is: https://serwer1901590.home.pl/
Mateusz.
The problem were three the same scripts in the plugin: header and footer, these scripts are the disappearance of basket icon and live chat on mobile devices when the user scrolls down and when scrolls up, they appear. if i delete it, the forum works correctly but i want these scripts to be there. How can i modify them to work with the forum? i don’t want to choose.
You should modify those to make those “working”, not to make those “working with wpForo”. Do anything you can to make those work without JS errors, once you did it the wpForo will work fine automatically. So your task is duplicating that script without JS errors. You should contact to that JS error support, became wpForo doesn’t have any way to affect your code.
Thanks for support!
Have a great day.-
This reply was modified 6 years, 4 months ago by
xszejdi.
Hello again @gvectors-team,
I have three the same scripts (on 3 different classes) and i don’t know what may be the reason why they don’t interact with the forum, please help me.
Scripts are inside header on all wordpress pages.<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> // basket on scroll var didScroll; var lastScrollTop = 0; var delta = 5; var navbarHeight = $('.xoo-wsc-basket').outerHeight(); $(window).scroll(function(event){ didScroll = true; }); setInterval(function() { if (didScroll) { hasScrolled(); didScroll = false; } }, 250); function hasScrolled() { var st = $(this).scrollTop(); // Make sure they scroll more than delta if(Math.abs(lastScrollTop - st) <= delta) return; // If they scrolled down and are past the navbar, add class .nav-up. // This is necessary so you never see what is "behind" the navbar. if (st > lastScrollTop && st > navbarHeight){ // Scroll Down $('.xoo-wsc-basket').removeClass('.xoo-wsc-basket').addClass('basket-nav-up'); } else { // Scroll Up if(st + $(window).height() < $(document).height()) { $('.xoo-wsc-basket').removeClass('basket-nav-up').addClass('.xoo-wsc-basket'); } } lastScrollTop = st; } </script>-
This reply was modified 6 years, 4 months ago by
xszejdi.
First please remove the jQuery lib.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>The duplication always causes JS errors. WordPress has already loaded jQuery you should not load it again.
-
This reply was modified 6 years, 4 months ago by
gVectors Team.
I tried but script doesn’t work without it and Forum buttons works.
If jquery is included:
If jquery is not included, script doesnt work and there’s no error in console.
I’m sorry but I can’t make your code compatible with wpForo. Something wrong with that and you should find it yourself.
It’s ok! 🙂
After quick research, i fixed it! The solution was replacing all dollars into jQuery due wordpress compability mode.
-
This reply was modified 6 years, 4 months ago by
xszejdi.
Nice! Thank you for the update.
hello bro.
i also have that problem.
the post bottons not working.
http://ani4me.ir/gap/anime/%D8%AF%D8%B1%D8%AE%D9%88%D8%A7%D8%B3%D8%AA-%D8%AA%D8%B1%D8%AC%D9%85%D9%87-%D8%A7%D9%86%DB%8C%D9%85%D9%87/please tell me how i can sloving that problem?
i deactivated all my plugins not the problem not solving…
Hi @myanime,
I see the jQuery lib is loaded twice, please remove these three JS files:These JS files are probably coming from your theme footer.php or from other places. You should find and remove those.
-
This reply was modified 6 years, 4 months ago by
The topic ‘Post buttons’ is closed to new replies.
