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

Spinning icon problem (maybe IPv6 or browser dependent) #1439

Closed
chtaube opened this issue Jun 27, 2013 · 14 comments
Closed

Spinning icon problem (maybe IPv6 or browser dependent) #1439

chtaube opened this issue Jun 27, 2013 · 14 comments
Labels
admin panel bug Something isn't working
Milestone

Comments

@chtaube
Copy link

chtaube commented Jun 27, 2013

I installed YOURLS 1.6 on my FreeBSD root-server and have the "spinning icon" problem: The "Shorten" button gets a little spinning icon forever and nothing happens. However, clicking "Admin interface" afterwards shows the new link has been successfully added to the database.

I read the wiki-page about the "Spinning Icon" problem and tried to pin down the problem:

In Firebug, /admin/admin-ajax.php is requested and successfully served by the server (Status: 200 OK).

The answer from admin-ajax.php as shown in Firebug looks like this:

{ "url": { "keyword": "4syz5", "url": "https://github.com/YOURLS/YOURLS/wiki/Endless-Spinning-Icon", "title": "Endless Spinning Icon · YOURLS/YOURLS Wiki · GitHub", "date": "2013-06-27 13:30:05", "ip": "2a01:198:309:1:4894:8c8d:44d:3869" }, "status": "success", "message": "https://github.com/YOURLS/YOURLS/wiki/Endless-Spinning-Icon added to database", "title": "Endless Spinning Icon · YOURLS/YOURLS Wiki · GitHub", "html": "<tr id=\"id-y860545193\"><td class=\"keyword\" id=\"keyword-y860545193\"><a href=\"http://chtau.be/4syz5\">4syz5</a></td><td class=\"url\" id=\"url-y860545193\"><a href=\"https://github.com/YOURLS/YOURLS/wiki/Endless-Spinning-Icon\" title=\"Endless Spinning Icon · YOURLS/YOURLS Wiki · GitHub\">Endless Spinning Icon · YOURLS/YOURLS Wiki · GitHub</a><br/><small><a href=\"https://github.com/YOURLS/YOURLS/wiki/Endless-Spinning-Icon\">https://github.com/YOURLS/YOURLS/wiki/Endless-Spinning-Icon</a></small></td><td class=\"timestamp\" id=\"timestamp-y860545193\">Jun 27, 2013 13:30</td><td class=\"ip\" id=\"ip-y860545193\">2a01:198:309:1:4894:8c8d:44d:3869</td><td class=\"clicks\" id=\"clicks-y860545193\">0</td><td class=\"actions\" id=\"actions-y860545193\"><a href=\"http://chtau.be/4syz5+\" id=\"statlink-y860545193\" title=\"Stats\" class=\"button button_stats\" >Stats</a><a href=\"\" id=\"share-button-y860545193\" title=\"Share\" class=\"button button_share\" onclick=\"toggle_share(\'y860545193\');return false;\">Share</a><a href=\"http://chtau.be/admin/admin-ajax.php?id=y860545193&action=edit&keyword=4syz5&nonce=e72365b0b2\" id=\"edit-button-y860545193\" title=\"Edit\" class=\"button button_edit\" onclick=\"edit_link_display(\'y860545193\');return false;\">Edit</a><a href=\"http://chtau.be/admin/admin-ajax.php?id=y860545193&action=delete&keyword=4syz5&nonce=3aa3dff82b\" id=\"delete-button-y860545193\" title=\"Delete\" class=\"button button_delete\" onclick=\"remove_link(\'y860545193\');return false;\">Delete</a> <input type=\"hidden\" id=\"keyword_y860545193\" value=\"4syz5\"/></td></tr>", "shorturl": "http://chtau.be/4syz5", "statusCode": 200 }

I'm not an JSON expert, but the response looks good to me. Maybe someone can give me a hint what might be wrong.

I thought about an IPv6 related problem and tried accessing via IPv4. I wasn't able to fix it down to this, but I found out that Internet Explorer 8 had no problem with editing/adding URLs. No spinning icon there with either IPv4 nor IPv6.

This is the entry in the nginx log file:

2a01:198:309:1:4894:8c8d:44d:3869 - chtaube [27/Jun/2013:11:30:05 +0000] "GET /admin/admin-ajax.php?action=add&url=https%3A%2F%2Fgithub.com%2FYOURLS%2FYOURLS%2Fwiki%2FEndless-Spinning-Icon&keyword=&nonce=93af40e8a2 HTTP/1.1" 200 2116 "http://chtau.be/admin/index.php" "Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)"

PHP and Suhosin show no error messages in its logfiles.

Browsers I have tested were:
* Iceweasel 3.5.16 (Firefox in Debian Linux)
* Mozilla Firefox 20.0.1 (Windows)
* Opera 12.15 (Linux)
* rekonq 0.5.0 (Linux)
* BlackBerry Browser 10.1.0.2354
* Midori 0.2.4 (Linux)
* Internet Explorer 8 (the only working browser!)

I have updated YOURLS to 1.7-alpha from github. No change.

Server:

FreeBSD 9.1-STABLE r252094

nginx/1.4.1

PHP 5.3.19 with Suhosin-Patch (cli) (built: Dec 22 2012 16:18:00) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
@ozh
Copy link
Member

ozh commented Jun 27, 2013

Tricky one.

The JSON response and server log show that the request is handled correctly. The problem seems to be purely on the client side, hence a Javascript problem, and for once it's MSIE that works :-P

Since your server is live on the net, could you set me up a temp account on your YOURLS setup? 1% chance I'll find something that you didn't see but hey, who knows...

@chtaube
Copy link
Author

chtaube commented Jun 27, 2013

@ozh: I've sent you account data by e-mail.

@ozh
Copy link
Member

ozh commented Jun 27, 2013

Well... In short: I have no idea.

It's not about IPv4 or v6, I tried both, and anyway I have several YOURLS running on both and it works smooth. Everything seems to work fine (response content-type, etc)

Is there any funky host/server setup that could trigger a false "Same Origin Policy" error? (ie jQuery thinking the response doesn't come from chtau.be?)

@chtaube
Copy link
Author

chtaube commented Jun 27, 2013

I am using the FreeBSD jails mechanism on my server: The PHP interpreter is running inside a jail and is separated from the rest of the system. It has its own (internal) IP address, too. Requests to .php files are forwarded into the jail by nginx and processed by php-fpm inside the jail.

I am not sure if jQuery would have any problems with that setup, as I don't know how jQuery works. At least, jails are very commonly used on servers running FreeBSD. There is a Wordpress installation in the same jail where YOURLS is located and it is running flawlessly.

As far as I understand, jQuery is running on the client side within the browser? Is there any possibility to debug jQuery stuff or enable some kind of logging, so I can take a deeper look into this?

@ozh
Copy link
Member

ozh commented Jun 27, 2013

Firebug in Firefox shows only normal stuff for the jQuery ajax stuff.

If you are positive that everything ajax works in WP (everything that refresh in the admin area without page reloading, for instance, when you write a blog post, add tag and you click on the "Choose from the most used tags" link), then I'm totally lost and have no idea.

There has been no similar issue raised after a couple dozens of thousands install, it has to be something very specific to your server, but I have no idea what...

@ozh
Copy link
Member

ozh commented Jun 27, 2013

Just curious: in your config.php, if you replace chtau.be with go.chtaube.eu, does it fail the same?

@chtaube
Copy link
Author

chtaube commented Jun 27, 2013

Just changed it to go.chtaube.eu and: Yes, same problem here.

And for WordPress: "Choose from the most used tags" opens the most used tag right underneath it, without me reloading the page of course.

@ozh
Copy link
Member

ozh commented Jun 27, 2013

Last idea: try installing YOURLS in a subdirectory on blog.chtaube.eu and chtaube.eu (eg blog.chtaube.eu/yourls/ and chtaube.eu/yourls) and tell if that works or not (I'm still investigating the "funky host/server setup" way)

@chtaube
Copy link
Author

chtaube commented Jun 27, 2013

Copied it here and modified config.php to the new location, but still no go.

@ozh
Copy link
Member

ozh commented Jun 27, 2013

Well... I'm officially out of ideas. Sorry, I don't know.

@chtaube
Copy link
Author

chtaube commented Jun 27, 2013

Ok, thank you very much for your help! I will sleep over this, maybe I have another clue tomorrow. I will let you know if I find something.

@chtaube
Copy link
Author

chtaube commented Aug 4, 2013

I just updated from PHP 5.3 (with suhosin 0.9.33) to PHP 5.5 (without suhosin) and this fixed the issue. I guess some security stuff within suhosin might be the cause for the spinning icon issue I had.

I could switch back to PHP 5.3 and remove the suhosin module to further investigate this, but I think the public interest might not be too high as I seem to be the only reported case with this problem. :-)

@chtaube chtaube closed this as completed Aug 4, 2013
@ozh
Copy link
Member

ozh commented Aug 6, 2013

Out of curiosity, check issue #1463 also related to suhosin

@bseclier
Copy link

Hi folks,
I have the same problem here.
I installed yourls on a fresh server (php 5.1.6), and I'm not using suhosin.
In firebug, I get the same (Status: 200 OK).
The icon is always spinning but when I refresh the admin page, my new link is here.
When I paste the "add URL" in my web browser, it works too.

Nothing in my error logs, just this in my access logs :
GET /admin/admin-ajax.php?action=add&url=http%3A%2F%?Ffoo.fr&keyword=bar&nonce=5t2897r4j9 HTTP/1.1" 200

Except suhosin, do you have any idea what could be the origin of that problem ?
Thanks a lot !

Note : the "edit" button doesn't work either (but the "delete" button works).

@reezer reezer mentioned this issue Jun 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin panel bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants