Jump to content
John W.

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

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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. :/

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peter Knight
      Hi guys
      is there a checklist of items I should consider for diagnosing a series of pages which display a 404 error?
      Basically I have built a Blog and all my posts are under a folder called 'Posts'. Some of these pages successfully display while others display a 404 page. 
      This is what I have confirmed so far...
      1. All pages are within the same root folder 'Posts'
      2. All pages have the same template and fields completed
      3. All pages have the same properties under Settings > Who can access this page
      4. Pages have no redirects in place
      5. Pages have no special characters or anything funky in the URL slug
      There are no errors showing in the log either so I am stuck 😕
      Thanks
    • By dimitrios
      Hello,
      this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.
      To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:
      Minimum Required Facebook App configuration:
      on Settings -> Basics, provide the App Domains, provide the Site URL, on Settings -> Advanced, set the API version (has been tested up to v3.3), add Product: Facebook Login, on Facebook Login -> Settings, set Client OAuth Login: Yes, set Web OAuth Login: Yes, set Enforce HTTPS: Yes, add "https://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs. This module is configurable as follows:
      Templates: posts can take place only for pages with the defined templates. On/Off switch: specify a checkbox field that will not allow the post if checked. Specify a message and/or an image for the post.
      Usage
      edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.
       
      Download
      PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost   Note: Facebook SDK for PHP is utilized.


    • By AlexMWI
      Hello! Please tell me how to install pixel Facebook on the site? Link to the installation module or / and connection instructions.
    • By horst
      Hey,
      I want to hook into the 404 handling of PW at the most earliest stage. Pleas can anybody point me to the hook or file that suits this best?
    • By dweeda
      I installed an SSL Certificate, then edited my .htaccess file:
        # -----------------------------------------------------------------------------------------------
        # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below.
        # -----------------------------------------------------------------------------------------------
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      by uncommenting out the Rewrite lines.
      Now I get 404 error pages when I try go to any .../processwire-master/<pagename>/
      This includes my admin page at .../processwire-master/processwire/, so i can't get into my admin.
      What else do I need to do?
×
×
  • Create New...