Site Kit loads your loader.js script for logged-in users viewing their front end. This creates a conflict if the user’s page also needs loader.js to display a Google Chart viz. In my case calling loader.js twice prevents my Google Chart from displaying. (Note: This happens for logged-in users only, so not a problem for regular site-viewers. But not helpful for people composing posts who can’t see the charts.)
Tested by removing my script call (while logged in) so only oe loader.js call (by Site Keit: Chart displays.
Does Site Kit needs loader.js on the front end? If not, perhaps put the script call inside an
However, another potential conflict would be with plugins that use Google Charts (so call loader.js).
In any case, stellar work on Site Kit. Many thanks.
Your code that refers to loader.js is in the
get_assets()method in /Core/Assets/Assets.php. And the output is:
<script src='https://www.gstatic.com/charts/loader.js?ver=1.30.0' id='googlesitekit-google-charts-js'></script>
The page I need help with: [log in to see the link]
- The topic ‘Conflict for logged-in users on front end: loader.js’ is closed to new replies.