Jump to content

Could Processwire Be Causing FB Share To Randomly Fail with 404?


John W.
 Share

Recommended Posts

Good morning folks. I've been going around in circles since last week on this one. I've got caching turned off on my site, but, wondering if there is an extra step I need to take when publishing a page when using  FacBook's social plugin? 

I've got a template for my news articles with  FaceBook's social share plugin embedded. After publishing the page, going to the article on the front end on the site, and clicking share, the share dialog in many cases will have the right page content but frequently it comes up with my custom 404 page.

FaceBook must be pinging back, in order to server up the custom 404, - so that seems to rule out the server blocking the ping-back.

Using the FaceBook debugger I can Show Existing Scrape information and see that it had a 404 response. However, without changing anything on the site, if I use the debugger to re-scrape the page there is no 404 and the page comes right up.

it seems as though even if the page is published and has been loaded in the browser when FaceBook calls back to my processwire site it's telling FaceBook the page doesn't exist. When this happens, I go over to the debugger, click re-scrape, and the page comes up fine -- but, I can't keep doing this all day long. (see the attached images)

Any advice or help would be greatly appreciated.

If it is any help I'm using Processwire 2.7.2 and Zurb Foundation 5

 

post-3466-0-09439200-1460385329_thumb.pn

post-3466-0-90289600-1460385335_thumb.pn

Link to comment
Share on other sites

Just a couple of observations -

In the first image they say they scraped your site December 31, 1969 at 6:00pm. That implies a problem, as it is very likely the Unix epoch in your time zone and suggests to me a problem at their end.

The other thing is somewhat minor, but one thing that you might want to address. That is standardising on the www or non-www URL for site and assets. You can enforce one or the other through .htaccess and, while it might have no bearing on current issues, is generally a Good Thing.

Link to comment
Share on other sites

The other thing is somewhat minor, but one thing that you might want to address. That is standardising on the www or non-www URL for site and assets. You can enforce one or the other through .htaccess and, while it might have no bearing on current issues, is generally a Good Thing.

Yeah, I had the non-www in the FB App settings, working the other day I figured adding both might resolve the problem. but, nope.

Link to comment
Share on other sites

  • 2 weeks later...

Still not resolution on this one. 

The only thing I can think of is hook the on page save and use the facebook api to submit the url and loop until it comes back without a 404.

I just really shouldn't have to do this just to integrate a sharing plugin. :/

Link to comment
Share on other sites

Curious, though this might not be the issue for you; but did you manage to figure out (as DaveP suggested) why the scrape timestamp is so far behind reality? Are they all way out when you look at the debug page?

No, I didn't. It's almost as if ProcessWire is displaying the page to visitors but when FaceBook connects back, ProcessWire is saying, the page isn't here. I went as far as re-installing processwire last week.

If've got a page right now, when I hit share it showed my 404 page. I went straight over to facebooks Sharing Debugger, dropped in the url and clicked Debug. Boom! Fetched the page contents perfectly...went back to the page, now when I click share the properly contents are there. Absolutely insane.

My client reported if they create an article and publish it and get a 404 when they click share, if they go in and copy the article contents, delete the article, re-create it with the same contents - no 404.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...