1

I have an issue with ALL facebook comment plugins out there... We use Joomla 3.

While having such a plugin enabled, facebook fetch the article BEFORE publishing date (which always is set in the future on the site), with the result of a 404 error.

Upon publishing facebook doesn't refetch the article when our reader tries to share it on facebook, resulting in 404 error message on facebook, even though the article is live and published.

If I go to the facebook debugger, and refetch, it works alright - but we can't do that with all articles every day.

Is there a way to restrict a plugin to be executed either if the article isn't published, or to a certain user group?

My suspicion is that this occurs if an editor checks his article before it is published, so if I can restrict the plugin for special user groups it could maybe work..?

Appreciate any ideas...

With kind regards, - Johan.

2
  • do a simple hack to the plugin and put some conditions in it based on your requirement.
    – Jobin
    Nov 11, 2015 at 9:41
  • Sorry, I haven't got the experience to do that... Nov 11, 2015 at 11:34

1 Answer 1

0

Open the main PHP file in the plugin, and then, in the beginning of the function onContentBeforeDisplay add the following code:

if ($article->state != 1)
    return '';

Do the same thing for the function onContentAfterDisplay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.