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

On chrome, web interface redirects to http://localhost:20009/#restart on project creation or layer save #2534

Closed
YenTheFirst opened this issue Oct 6, 2015 · 5 comments
Milestone

Comments

@YenTheFirst
Copy link

Evironment: Ubuntu 14.04, current HEAD of tilemill, google chrome 45.0.2454.101

Steps to reproduce:

  1. Start a tilemill server
  2. On google chrome, go to localhost:20009
  3. Create a project.
  4. You are then redirected to http://localhost:20009/#restart, which contains only the text "Error: Page not Found".

Alternatively:

  1. Start a tilemill server
  2. On google chrome, go to localhost:20009
  3. Open any project
  4. Open a layer for editing, then save the layer. (no modification necessary)
  5. You are then redirected to http://localhost:20009/#restart, which contains only the text "Error: Page not Found".

This bug does not occur on Firefox. This bug started occurring a few weeks ago, without any update or configuration change in tilemill, so I expect it's related to a recent chrome auto-update.

@YenTheFirst
Copy link
Author

After further investigation by a coworker, it seems that the cause is the following:

on project creation (https://github.com/mapbox/tilemill/blob/master/views/ProjectAdd.bones#L31) or layer save (https://github.com/mapbox/tilemill/blob/master/views/Layer.bones#L376), all elements with class 'close' are clicked.

This includes two spans in the Pane template (particularly, https://github.com/mapbox/tilemill/blob/master/templates/Pane._#L5). I guess the click event from these spans is bubbling up to the anchor, and then being treated as a direct click on that button.

As a workaround, changing this.$('.close').click(); to this.$('a[href="#close"]').click(); works, which matches what views/App.bones currently does. However, I'm not sure if this is the correct fix. this.$('a.close').click(); also should work.

Actually, looking for similar code, it seems the 'save' button on new creating new stylesheet also exhibits this behavior.

@stevage
Copy link
Contributor

stevage commented Nov 28, 2015

Thanks for investigating - I ran into the same problem, with a much older version of TileMill. Knowing that this doesn't happen in Firefox is pretty useful!

@Nor67
Copy link

Nor67 commented Jul 25, 2017

I'm having the exact same problem with my local TileMill installation. Version 0.10.1 (v0.10.1-291-g31027ed) running on OSX 10.12.5.
Adding new stylesheet results in Error: Page not found and the new stylesheet is not added. Creating a new project also results in the same error but the new project actually is added. I've checked all 3 files that florianf fixed and the fixes are all there.
Any idea how to solve this? Thanks.

@Makosak
Copy link

Makosak commented Jan 16, 2019

Also running into this issue, even if running on a web browser other than Chrome. It's not clear what the solution is -- was there a different build recommended? Do I have to compile from scratch instead of using the zip download? I'm only using the application, not developing on this project; any help for my class would be super! (from the instructor's perspective -- if it's a workable and straightforward solution I could have the class follow as well)

@csytsma
Copy link
Member

csytsma commented Jan 16, 2019

I'm not familiar with the cause of the issue, but you can manually add a new Stylesheet by adding the .mss file in the "../MapBox/project//" folder, then try loading the project.

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

6 participants