Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigationbar does not show #99

Closed
Willem-Platje opened this issue Oct 24, 2017 · 9 comments
Closed

Navigationbar does not show #99

Willem-Platje opened this issue Oct 24, 2017 · 9 comments

Comments

@Willem-Platje
Copy link

Hi Yoann,

After updating to version 5.1.1. the toolbar that is displayed below the navigation board does not show anymore on http://www.dewilligedame.nl/partijen-intern/. I've also tried to display it on a normal wordpresspage and a normal wordpresspost. So, not even in a widget. Nothing helps ...

@yo35
Copy link
Owner

yo35 commented Oct 26, 2017

Hi,
Could you try to upgrade to 5.1.2 ? (just released) This may actually be a bug of the plugin, although I don't really understand why version 5.1.1 works properly in some environments (including my test website), but not in some other environments...

@Willem-Platje
Copy link
Author

Willem-Platje commented Oct 27, 2017 via email

@yo35
Copy link
Owner

yo35 commented Oct 27, 2017

Hi Wim,
I cannot see the JavaScript files included by the RPB Chessboard plugin in your webpages. I guess this is because you are using a plugin that caches the JS files in some way. What is this plugin? Could you try to disable it?

@Willem-Platje
Copy link
Author

Willem-Platje commented Oct 27, 2017 via email

@yo35
Copy link
Owner

yo35 commented Oct 27, 2017

Hi Wim,

The problem comes from your theme: customizr. More precisely, it comes from the following JS file (which is brought by the theme):
http://www.dewilligedame.nl/cms/wp-content/themes/customizr/inc/assets/js/tc-scripts.min.js

Among other things, this script modifies the behavior of the jQuery method used to build button widgets (I don't know why). And as of version 5.0, RPB Chessboard uses this method!

One thing I've noticed: I've installed the the customizr theme on my test site, and it works fine together with RPB Chessboard. This is explained by the fact that the regular version of customizr does not include the script mentioned above (instead, I get the following script: http://.../wp-content/themes/customizr/assets/front/js/tc-scripts.min.js). I don't know why customizr includes the wrong script on your website but not on mine: maybe you are using the "pro"-version, maybe this is due to your child theme...

I see two ways for you to fix this:

  • Find why the .../inc/assets/js/tc-scripts.min.js script is included, and replace it by the .../assets/front/js/tc-scripts.min.js if possible.
  • Include the following piece of JS code just after the nasty script (this restores the default behavior of the jQuery method that creates buttons):
<script type='text/javascript'>
  jQuery.fn.button.noConflict();
</script>

(thanks for disabling the cache, it is much easier to understand what happens without it)

@Willem-Platje
Copy link
Author

Hi Yoann,

I didn't work after all. Sorry. The buttons showed up, but now all my pictures were not showing so I had to upload tc-scripts.min.js again.
Website is OK, but the buttons under the diagram don't show anymore. Perhaps because your code is not in
tc-scripts.min.js Can I put it your not minified code in that file and try that?

Kind regards,

Wim

@yo35
Copy link
Owner

yo35 commented Nov 11, 2017

Hi Wim,
Sorry for the late reply.

The problem comes from the fact the script tc-scripts.min.js modifies the default behavior of the jQuery methods used to build buttons, while RPB Chessboard expects the default behavior.

Did you try the second solution I proposed? (using the jQuery.fn.button.noConflict() function) If not, I suggest you contact the author of your theme customizr to see whether it is possible to have it works without modifying the jQuery.fn.button method.

I think putting the minified code of RPB Chessboard in tc-scripts.min.js will not solve the problem.

@yo35
Copy link
Owner

yo35 commented Dec 3, 2017

As of version 5.1.4, the jQuery.fn.button.noConflict() workaround can be directly enabled by RPB Chessboard. To enable it, go to the admin pages, "Chess" > "Settings" > "Compatibility settings", and select "Try to fix jQuery's buttons".

@Willem-Platje
Copy link
Author

Hi Yoann,

I am very grateful for this solution! It works perfectly! Thank you very much.

I haven't yet contacted the authors of theme Customizr to see whether it is possible to make it work without their modifying the jQuery.fn.button method. To my opinion modifying the default behavior of the jQuery methods used to build buttons is not as it should be.

I'll resume publishing chess-games on the website of my club now. Thanks also for adding the flip-board-function. Very convenient!

Kind regards,

Wim Platje,
Webmaster Chessclub "De Willige Dame"

@yo35 yo35 closed this as completed Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants