Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

de.serlo.org doesn't work on iOS #89

Closed
inyono opened this issue May 28, 2015 · 8 comments
Closed

de.serlo.org doesn't work on iOS #89

inyono opened this issue May 28, 2015 · 8 comments
Labels

Comments

@inyono
Copy link
Member

inyono commented May 28, 2015

Both in Safari and Chrome, opening https://de.serlo.org redirects to https://de.serlo.org/^[%20/t/r/n/f]+|[%20/t/r/n/f]+$/g

Edit: it works locally, though (using vagrantshare)

@inyono inyono added the bug label May 28, 2015
@aeneasr
Copy link
Member

aeneasr commented May 28, 2015

could be caused by cloudflare

@aeneasr
Copy link
Member

aeneasr commented May 31, 2015

this is reproducible when using the ios simulator and the latest iphone

@aeneasr
Copy link
Member

aeneasr commented May 31, 2015

It looks like this was caused by webcomponents.js, which has been solve here: 17484c9

@aeneasr aeneasr closed this as completed May 31, 2015
@nazar-pc
Copy link

CloudFlare passes window.location object to window.URL constructor while constructor accepts only strings, which is why https://github.com/webcomponents/webcomponentsjs/blob/c9bceeedb4077b5658d95f5755883592be92fcaf/src/URL/URL.js#L473 works very differently and causes this error, meaning redirect to another page instead of string replace.

CloudFlare already notified about this, hope they'll fix it soon.

@aeneasr
Copy link
Member

aeneasr commented Jul 13, 2015

Thanks for tracking this down!!

@terinjokes
Copy link

@nazar-pc this still doesn't make sense, just a few lines beforehand the base property is stringified and converted to a jURL instance.

https://github.com/webcomponents/webcomponentsjs/blob/c9bceeedb4077b5658d95f5755883592be92fcaf/src/URL/URL.js#L468

@nazar-pc
Copy link

nazar-pc commented Sep 9, 2015

@terinjokes, regexp works with url variable, base is not relevant there.

@terinjokes
Copy link

@nazar-pc I fixed this a while ago, but just came across this thread, I forgot what I was doing. Sorry, carry along. :)


The code that was failing on CloudFlare was a feature detection check to see if the URL constructor exists and works. It does this by passing in window.location (and now window.location.href) as the first parameter to the URL constructor, and checking the output.

If the URL constructor exists and works, then throughout the codebase, the URL constructor is passed two arguments, url and base, and I'm accustom to base often being window.location (now window.location.href).

For a moment after reading this thread, I thought the issue was in this latter case, rather than the former, thus the confusion.

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

No branches or pull requests

4 participants