Hi,
I'm having a few problems with comment and admin cookies. That is, the admin cookie that makes sure I get that neat little "Edit This" link, and those cookies that save commenters usernames, emails & urls behave strangely. It all works fine as it should in Internet Explorer Windows, but doesn't work for me in Firefox 1.0PR.
I recently added some Javascript/Flash effects (sIFR), and prior to that, I upgraded to Wordpress 1.2.1. I have no idea whether this should have anything to do with the cookies, but I thought I'd mention it, since I remember it to be working prior to this.
I have set up a special post, just for testing comments. If you want to comment and see if it works, please do it there:
http://www.noscope.com/journal/2003/10/comment-junkyard
Any and all advice is very much appreciated.
Don't have any advice I'm afraid but I have the very same issue on occasion. I've had this happen with previous versions of WP and Firefox though too. :(
I had some problems with like this when I first upgraded to 1.2.1 from 1.2. For me those problems all went away after I deleted all my cookies.
Hmm. I'm pretty sure I tried that (via privacy > clear cookies). Does it require more than this, to delete all cookies?
Nope, that's all it takes. Since you said above that you've got it working now; there's not much we can do about it. If it does come back; I'd say try clearing both your cache and cookies. If that doesn't work, come back to the forums and maybe we can figure something else out.
I will, thanks for your help.
I think the issue here is the same one I commented to earlier (I can't find the thread because the "search" button is broken), but the symptom is a bunch of "redirect" and "wp-smilies" in the address bar. It happens in both IE and Firefox.
As best I can tell, something is overwriting one of the "Options" fields in WOrdpress. It happens in 1.2.1 and it happens in 1.3 alpha. It does not happen in Wordpress 1.2.
Here's what happens: under "Options", I set both "Wordpress address" and "Blog address" to http://chasingthewind.net . A day or two later, something overwrites the "Wordpress" address and adds a "www" in front to http://www.chasingthewind.net . When that happens, for all users including me, the cookies break. When I was on GoDaddy.com, the style.css couldn't be read resulting in an unformatted index.php display and users were redirected to a login screen, rendering them unable to comment.
I've switched to http://blogs-about.com for hosting and I don't have the same severity of problems anymore, but the "Wordpress" address is still getting overwritten every day or to with the "www" added back in. Now the symptoms are that the cookies get broken, the "edit this" links disappear, users can still comment but they have to fill in their name and email address again.
Fixing it temporarily is easy: Login to your wp-admin screen and fix the "Wordpress" and "Blog" addresses under "Options". But 24-48 hours later again, it's broken.
THANK you. This was bugging the hell out of me, especially since the problem reappeared for me, just a few hours ago!
Indeed the "www" mysteriously disappears.
I suppose, if I remove the "www" from both URLs, all will be dandy?
I've considered that for a while, anyway. Still, I don't like to be forced into such choices. If anyone has a lasting solution, that would be appreciated more. So glad to have found the cause though. Thanks Sphyr.
I've written a blog post about this problem, which details how to use .htaccess to redirect all users coming to your site with "www." to the same address with "www." removed.
You can read my blog post here.
Joen, removing the "www" only fixes the problem temporarily. Eventually, something changes the Wordpress address to include the "www" again and the cookie problem reappears.
Turnip, wait a day or two and see if the problem returns. I think, even if you redirect users to the root folder that the cookies problem returns since the Wordpress and Blog address are different.
At one point I installed a generic Wordpress with no plugins and still had the same problem, so I'm convinced it's something added in 1.2.1.
It sounds like a good idea Joen, but I guess you'll have to wait a few days to see if it changes.
Be aware that visitors who still go to your blog using "www." in front of the domain won't have access to the cookies features. That's what my .htaccess mod sorts, and hopefully the URIs won't change back, as they no longer contain "www.".
I filed a bug report:
http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000387
Add your comments if I missed anything.
Thanks for reporting it. I added that there also seems to be problems with Safari -- something a friend reported to me.
The solution/temporary fix I posted seems to work fine except for one thing: If used in conjunction with scriptygoddess' Subscribe To Comments plugin, the url that is provided in each email (following "You can see all comments on this post here: "), breaks.
Acceptable loss until the bug is fixed, me thinks.
Anonymous
Unregistered
Posted 3 years ago #
Just to help others understand this issue a little better, WordPress stores two cookies on your machine when you login. Both use a hashed representation of your URI to 'indivualize' them, presumably to allow distinction between multiple WP implementations on the one site.
If the URI being used to access the site doesn't match the value set in WordPress Options (ie you use http://mysite.com to access the site but have set http://www.mysite.com in your Options), the recognition of the cookie stops working, because an md5() (the function used to provide the hash for the cookie name) of 'http://mysite.com' returns a different value than an md5 of 'http://www.mysite.com'.
eg:
md5('http://mysite.com') = c43dcea2ed890728ec5c76b7655d9128
md5('http://www.mysite.com') = 1c81e23dac03688f1b5c5dffdbcae01b
This means that when accessing the site as http://mysite.com, WP will go looking for a cookie named:
wordpressuser_c43dcea2ed890728ec5c76b7655d9128
In this example it won't find it, as the cookie will have been saved using md5('http://www.mysite.com') and therefore will actually be named:
wordpressuser_1c81e23dac03688f1b5c5dffdbcae01b
Interestingly enough, I came across this issue because for some reason my wordpress address was changed without my intervention from http://www.planetthoughtful.org to http://www.planetthoughtful.com. I own both domain names, but rarely use the .com extension. Interesting bug.
Much warmth,
planetthoughtful
Thanks for the explanation. I understand how this causes WordPress to not recognise cookies except where the *exact same* address is used. What I do not understand is why the blog address options are automatically modified.
I'm sure this wasn't a problem before 1.2.1, so is this a new feature (unique hashing)?
Also, my workaround seems to work; I haven't had either of the URI options changed automatically, and it's been a number of days. My guess is that they only change automatically if you have "www." in them.
Hi Turnip,
Check out John Watson's site for a proposed temporary workaround.
http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000251
Thanks to John for making this available!
Much warmth,
planetthoughtful
The mosquito captures how to reproduce it; go to your http://www.myblog.com/wp-login.php and login. Then view your site. Presto, your site URL now contains a "www" even if it wasn't there before. That breaks all the cookies.
It's listed a "minor" on the mosquito, but this bug breaks skins, keeps users from posting, displays a nul css file, removes the edit button, floods your screen with redirect?=wp-smilies and more.
One other issue I have just recently discovered, is most likely related to this, although probably not a bug as much as a change.
When typing in the URIs in the two URI fields, any trailing slashes are automatically, and immediately stripped.
In my case,
http://www.noscope.com/journal/
becomes
http://www.noscope.com/journal
The problem, although slight, is that the first of these two (with the trailing slashes), is the URL that has been added to various blogrolls out there.
In other words, I would appreciate it, if Wordpress would accept my choice of a trailing slash.
drewbeck
Member
Posted 3 years ago #
This may be a problem with the interaction between WordPress and Apache (or other server software? I only know Apache). I was having some issues with the "www.fred.com" v. "fred.com" syntax and found out that my install of Apache is set to automatically redirect to "fred.com."
The setting is called UseCanonical and it is set in the httpd.conf file.
I found that when I went to "http://www.mysite.com/blog" (with 'www', no trailing slash), I was redirected to "http://mysite.com/blog/", which caused my cookies to break. I believe this was because Apache first looked for the file called "blog", couldn't find it, redirected to the directory "blog/" and, in the process, used the canonical version of my domain, "mysite.com".
There might be some interaction between WordPress and this feature of Apache which causes the domain data to be rewritten in the database.
I'd like to put attention to this issue again, as I have just recently tried out a few nightlies that do not seem to suffer from this issue.
Has the bug been fixed in 1.3 alpha 5? If so, what file can I grab from there and use in my 1.2.1 installation? wp-login.php?
I use WP 1.5 beta Jan 02 2005 edition, and I still have the problem.
anyone ever found anything ?
This bug drives me nuts. Why? I don't know. Just aggrivating I guess. If someone finds anysort of cure, please post it as a new topic to get it the attention it needs.