osompress / genesis-simple-share

Plugin: Genesis Simple Share
36 stars 16 forks source link

Sharrre.js file not loading in all cases where it is being used #22

Closed NicktheGeek closed 10 years ago

NicktheGeek commented 10 years ago

We have a report of a customer with an error on the home page of the centric pro theme (presumably other themes are affected) which is causing the header resize script to fail. The error is because the sharrre.js file is not being loaded but there are content entries that are trying to use the sharrre() JS function.

For reference, this is the site http://josh-stark.preview33.rmkr.net

bgardner commented 10 years ago

Apparently the header resize issue is only present on the homepage (or on pages where share buttons aren't output?)

bgardner commented 10 years ago

Looks like it's only his homepage where it's not working?

NicktheGeek commented 10 years ago

yes it is only the home page. I am running a check to see if the script should be loaded before loading the script so I need to amend that check

NicktheGeek commented 10 years ago

ok, found the issue. The site was set to not show the buttons on archives but something changed the home page query causing the buttons to try and load when they shouldn't have. I altered the check for the archive to only load once and then to set a flag in the class to stop from loading the buttons if the script didn't get loaded. This works on the site with the issue and should actually require slightly less resources per page load.

ready for testing. To test, use the centric theme and setup the home page. in the simple share setting set it to display on posts/pages and no archives. The header should work correctly on the home page and buttons should show on posts and pages correctly.

dreamwhisper commented 10 years ago

This appears to be working for me, @NicktheGeek

katyfb13 commented 10 years ago

confirmed and production ready

katyfb13 commented 10 years ago

it looks like this may have already gone out in a prior update but just didn't get closed off. It's looking good to me, but @dreamwhisper will you please take a look in a production site and confirm if this is good to close?

dreamwhisper commented 10 years ago

@katyfb13 yes, it appears to have gone out earlier. Closing.