Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Just stopped working, Google Maps set assetsChanged to true #99

Closed
sarjanen opened this issue Oct 26, 2012 · 7 comments
Closed

Just stopped working, Google Maps set assetsChanged to true #99

sarjanen opened this issue Oct 26, 2012 · 7 comments

Comments

@sarjanen
Copy link

Today my turbolinks just stopped working. Everything worked yesterday and I have not done any updates. Turbolinks do not even work when i disable all my other javascript files (I use Rails 3.2.8 and have commented out everything exept jquery, jquery_ujs and turbolinks in my application.js).
I have tried to trigger turbolinks manually with Turbolinks.visit(path) but it is the same.

Now when i click on a link, the browser makes a GET request with the new page like it's expected to do but the get response contains the full page and not only the body. After the get request are done, browser do a full page reload.

I have set a brek point in firebug (line 14) to test if the broswer support pushstate and it does, breakpoint never triggered.

I have uninstalled the gem, cleared catch, tested in FireFox 16.0.1, Chrome 22.0.1 and Safari 6.0.1, everything are the same!

Please, help me to solve this really annoying problem. I haven't done any changes since yesterday and then everything worked fine.

Edit,
I installed Oh My ZSH yesterday but guess it does not matter.

@kossnocorp
Copy link

  1. Please show output for: cat Gemfile.lock | grep turbolinks.
  2. Check what is going on in this part: https://github.com/rails/turbolinks/blob/master/lib/assets/javascripts/turbolinks.js.coffee#L28:L34. I guess assetsChanged(doc) may return true.

@sarjanen
Copy link
Author

1 Gives me:

    turbolinks (0.5.1)  
turbolinks  

2 Yes, assetsChanged(doc) returns true. Why and how can I fix this?

@kossnocorp
Copy link

Can you figure out why assetsChanged(doc) returns true?

@sarjanen
Copy link
Author

I have not a clue, what does assets Changed(doc) do? The source are too complex for me and I haven't changed any assets.

If i remove https://github.com/rails/turbolinks/blob/master/lib/assets/javascripts/turbolinks.js.coffee#L28-30 everything works fine but after a few clicks i get an error on https://github.com/rails/turbolinks/blob/master/lib/assets/javascripts/turbolinks.js.coffee#L54
"currentState is null". Maybe can help?

@fred
Copy link

fred commented Oct 27, 2012

are you requiring turbolinks 'after' all other javascripts in the manifest ?

@sarjanen
Copy link
Author

After commenting out all other files the order is jquery, jquery_ujs, turbolinks

@sarjanen
Copy link
Author

Its google maps that trigger the assetsChanged(doc), if I remove <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> from my head tag everything works like it should. Why and how can I prevent this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants