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

Enabling event tracking causes the CMS editor's "insert URL" to fail after several minutes #39

Open
ksdhans opened this issue May 13, 2016 · 0 comments

Comments

@ksdhans
Copy link

ksdhans commented May 13, 2016

This is a rather bizarre issue. I've had a problem where clicking on the "insert URL" button in the CMS would stop working after several minutes. What would happen is this:

  • I'd log into the CMS, and everything would work fine
  • After several minutes, the CMS would ping the server
  • After the ping, framework/jquery/jquery.js would be loaded. Since Silverstripe's framework had already included jquery (in lib.js), this would kill some things, such as the "insert URL"

I've finally traced this to GoogleLogger::onAfterInit(). When I comment out the line that includes jquery.js, then this no longer happens.

Obviously, commenting out that line could cause trouble on the front end if jQuery isn't loaded. So perhaps the code in onAfterInit() should be executed only if the controller is a child-class of ContentController, e.g.:
if (Controller::curr() instanceof ContentController) {
// insert onAfterInit() code here
}

NOTE: This is with Silverstripe 3.3

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

1 participant