Magento - Internal server error - cookies

I have a Magento site which has multistore setup.
The problem is when we browse the frontend after a few page visits suddenly the site stops loading. When I look into the server access log, it shows response code 500 for the URL which was accessed last.
I am unable to reproduce the issue because the errorneous URL is not consistent.
If I would delete the cookie "frontend" set by Magento, the site works seamlessly again.
I don't know how I can narrow down the debugging considering the effect of "frontend" cookie. Can anyone please advise.
Thanks in advance.

Related

The page at https://lyrics-chords.herokuapp.com/ was not allowed to display insecure content from http://localhost:8000/auth/user

I've just finished creating a Django-React app and have pushed the changes to Heroku. The frontend (JS and CSS) appear on the website no problem, but requests to the backend result in the following error:
[blocked] The page at https://lyrics-chords.herokuapp.com/ was not allowed to display insecure content from http://localhost:8000/auth/user
I've consulted the Internet but no one seems to be getting the same error message. Consulting a friend, it seems as if I have to https secure my backend, and futher researching the subject, it seems that there is no free way to upload a SSL/TSL certificate (reference: heroku: set SSL certificates on Free Plan?). Is there a solution to this?
Silly me, really. Turns out, localhost:8000 refers to the computer of the user. https://lyrics-chords.herokuapp.com/ is the server for both the backend and frontend, so updating the backend end URL calls sufficed.

Status 500 for POST requests in django on IIS

Dear StackOverflow community, your help would be greatly appreciated.
I have zero experience with IIS. Unfortunately, a Windows Server 2012 with IIS 8.5 is all I can get for the current project. I followed this post by Matt Woodward to get my Django app running on IIS. I serve static files by means of an application that references the static folder. The app looks the way it is supposed to look and all GET requests are processed properly. However, the response to all POST requests (on localhost and remotely) is Status 500 Server Error. If I run my Django app with the runserver command, the POST requests are processed properly.
POST is NOT blocked in IIS Request Filtering -> HTTP Verbs. POST requests are sent to URLs like http:/site_title/update_plan/, not to html. The StackOverflow posts found here and here were not helpful.
I suspect the problem is in the IIS settings, but maybe some special Django settings are required and I am missing it. Any ideas on what can be done to fix the problem would be of great help. Thanks!

"Fetch as Google" doesn't load React routes on S3 with CloudFront

I have a react-router site on Amazon S3, with 404 redirects set to hit index.html, where they find the code they need and the site does what it should.
In Google Webmaster Tools, "Fetch as Google" for one of the routes gave error status: Not Found.
I set up Cloudfront for that origin with a Custom Error Response (404 to 200, with Response Page Path /index.html).
But "Fetch as Google" for one of the routes still shows error status: Not Found.
In Chrome or with curl, when I load http://[bucketname].s3-website-us-west-2.amazonaws.com/list/listname/username I see a 404 but the page then loads as expected.
But when I load http://[randomchars].cloudfront.net/list/listname/username I see a 200 with no re-direct and the page loads as expected.
I've submitted a sitemap with the relevant URLs I'd like indexed and asked Google to crawl the site. It hasn't been crawled yet, but my best hope right now are a couple of suggestions I've seen that "Fetch as Google" won't follow redirects, while Googlebot will when it actually crawls the site. I hope this is the case, but if I've missed any other obvious thing, I'd love to know. Thanks in advance!
I found setting cloudfront with the response page path as "/" worked for me!
I was stuck with the exact same problem.

how to debug facebook app/django setup (url is not valid...)

I'm trying to set up a facebook app using django by following this tutorial: http://www.rkblog.rk.edu.pl/w/p/example-facebook-application-django/ . I get to the point where I start my development server at (manage.py runserver 0.0.0.0:80)
then it says: Now under http://apps.facebook.com/NAME/ you should see a basic Facebook app comming from your server:
I, however, get an error message:
The URL http://my.ip/my_app_name/ is not valid.
I think I've set things up properly:
Canvas Page URL:
http://apps.facebook.com/my_app_name/
Canvas Callback URL
http://my.ip/my_app_name/
Question: how do I go about finding out what's wrong?
Thanks in advance!
Martin
update: when i visit http://my.ip/myappname/, it redirects to http://apps.facebook.com/my_app_name/?auth_token=eac7bf38fb5e591c55ddc458d16dc9b7
where i get the 'url not valid' message... However, when I paste the url with auth_token in it, django serves the requested page as expected... why is facebook saying the url is not valid if in fact it is...?
Is your router set up to forward requests on port 80 to your development machine? If not, you will get an error, as the way Facebook apps work is that Facebook's servers contact your server, get the content, then parse it and re-serve it back to the client.
I actually find with Facebook apps that the easiest thing to do is what you describe in your last sentence - get the auth_token URL, then paste it locally and work from there.

Facebook Connect not setting cookies

I'm trying to implement Facebook Connect on a website with .NET MVC using C#.
I've followed the instructions here: http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect step by step. I can make the login work as in that when I log in through the site I'm also logged into Facebook.
In order to work with this in the server I think I need to access the cookies Facebook is supposed to leave like:
APIKEY_user
APIKEY_session_key
...
as mentioned here http://wiki.developers.facebook.com/index.php/Verifying_The_Signature.
The thing is I'm not getting any of these cookies. I've googled and it seems like I'm the only person with this problem. Any ideas as to what I could be doing wrong ? Has this happened to anyone else ?
The issue was that I was developing locally using localhost.
I resolved the problem by changing the settings for the application to point to a certain web address instead of localhost and changing my hosts file lo point that same web address to 127.0.0.1
from the UI/client-side perspective, always insure you have the correct path indicated for the xd_receiver file in your FB.init() method.
Firecookie is very useful for seeing what Cookies are/aren't being set.