Topic-icon Still issue with K2 and share on Facebook

Active Subscriptions:

None
Hi,

I have written about this before but not able to reply to the original topic .

However, I'm still not able to share K2 articles on our site on Facebook - even after a very long time. I don't use Open Graph for this; I use the "Content plug-in - K2 Like" with the option of showing a button also for "Show Facebook Share".

You can try call up the K2 article "Medlemsmøde d. 9 november" in the left side of our site www.naestved-cykel-motion.dk. This article has been in place since the beginning of Oktober so I wonder why it is still not possible to use the Share option in the top when the article is viewed - without getting the 404 error.

Thanks,

Claus.
The topic has been locked.
Support Specialist
8 years 6 months ago #55454 by alzander
I don't see the Share button anywhere on that page. Can you let me know where I should be trying to share it from?

I just tried to run it through the Facebook Debugger. On the first attempt, I got:

Error parsing input URL, no data was cached, or no data was scraped.

That indicates there's no data in Facebook's system for that page, as you describe.

Once I clicked the "Scrape New Data", proper information does seem to appear.

I'd recommend checking Facebook's Crawler information page to see if there's anything that may be blocking their automated crawler on your server or any other problems that they mention there.

So your content can be scanned, it's just not happening automatically. As noted on that page, the first crawl should happen whenever someone tries to share your page. Please let me know how you're testing so we can see the behavior using your share method.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 6 months ago #55462 by ncmwebmaster
Hi Alex,

Thanks for looking into this. It's a bit strange to me; normally when I have scraped the page I can share without issues. But even you have scraped I still get an error. In order not to disturb the investigation I have not scraped myself.

I have attached a screenshot showing the share button - in Danish "Share" is translated to "Del".

Could it be our security component RSJoomla Firewall which is giving the issue - or what do you think?

File Attachment:



Thanks again,

Claus.
The topic has been locked.
Support Specialist
8 years 6 months ago #55463 by alzander
Ahh.. when I was testing earlier, I realize I went to the RSEventsPro article with the same name, which is why manual scraping didn't work.

With that said, we think we've found a possible cause of the issue. It deals with how we encode the URL when it's sent to Google, Twitter and other social networks for sharing. We perform the encoding to fix some issues with multi-lingual sites, but it seems as though a recent change in our code is causing issues with sites that are *not* using SEF URLs.

If you are comfortable with making a minor code-change to JFBConnect, it should fix the issue you're having. The change is in the /libraries/sourcecoast/articleContent.php. Around line 68, you'll see:
// URL Encode the path only, but not the slashes within the path 
$url .= implode('/', array_map('urlencode', explode('/', $path)));;
Change that too:
$url .= $path;
Please test and see if that helps things go as we think it should. Our quick testing seems to prove it out.

Thanks!
Alex
The topic has been locked.
Support Specialist
8 years 6 months ago #55464 by alzander
Oh.. to test, please clear your Joomla caches and browser caches (just to be safe) and then just try to share the article again. Since the Like/Share buttons will be for a slightly different URL, that should trigger Facebook to automatically fetch the page again.
The topic has been locked.
Active Subscriptions:

None
8 years 6 months ago #55476 by ncmwebmaster
Hi Alex,

Thanks again. Hopefully I have changed the file correctly and I have also cleared cahce and browser history.
But still no luck. The first article is working correct - but i'm sure this is because there have been a manually scrapping.

If I take the next article in the module to the left I still get the same error. Please look at the new picture I have uploaded.

Sorry if I'm doing something wrong...

Best regards Claus.


File Attachment:
The topic has been locked.
Support Specialist
8 years 6 months ago #55488 by alzander
Can you try creating a new article and seeing if it works with that? I can see that you made the change correctly as the og:url tag is now appearing without the encoding. That's good. However, it's possible that since Facebook already scanned the old pages and couldn't get them to load, that's still the cached data.

I don't know if trying with a new article will fix the problem, but it's my best guess. If so, it means that older content will eventually be fixed as it's re-scraped automatically by Facebook as well. I'd love to hear your results.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 6 months ago #55490 by ncmwebmaster

alzander wrote: Can you try creating a new article and seeing if it works with that? I can see that you made the change correctly as the og:url tag is now appearing without the encoding. That's good. However, it's possible that since Facebook already scanned the old pages and couldn't get them to load, that's still the cached data.

I don't know if trying with a new article will fix the problem, but it's my best guess. If so, it means that older content will eventually be fixed as it's re-scraped automatically by Facebook as well. I'd love to hear your results.

Thanks,
Alex


Okay - no problem. I will create a new article tonight and let you know.
The topic has been locked.
Active Subscriptions:

None
8 years 6 months ago #55492 by ncmwebmaster
Looks like it is working for new articles. Will the code change be part of the next version - or do I have to change the code after every new version?
The topic has been locked.
Support Specialist
8 years 5 months ago #55499 by alzander
Whew! I'm so glad to hear that looks like its working for you going forward. We're investigating how best to incorporate this into the next release so that it fixes the issue on your site and others that have SEF URLs disabled, while not causing new issues on other sites.

So, the next release *should* still work for you, but obviously test to ensure nothing unexpected happens.

Thanks,
Alex
The topic has been locked.