Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with my blog #6

Open
AureAureAure opened this issue Oct 22, 2020 · 5 comments
Open

Issue with my blog #6

AureAureAure opened this issue Oct 22, 2020 · 5 comments

Comments

@AureAureAure
Copy link

Hello,

Thank you very much for this great module.

Right now I just need it for categories, so it's only enabled for categories and turned off for all other sections.

But despite this, the module interferes in my blog. It puts an "og: title" with my bland name in addition to the original "og: title" of my blog. So there are two and Facebook recognizes the one which comes from your module. This is very annoying because it puts my brand name instead of the articles titles.

I cleared my cache and used the Facebook debug too but the issue is still there. When I disable the module there's no problem.

Would you have an idea how to fix it?

Thank you very much!

@AureAureAure
Copy link
Author

Hi again!

If you could give me a hint to resolve this issue that would be very kind of you. That's very important for me!

Thank you again.

@yusttas
Copy link
Owner

yusttas commented Oct 27, 2020

Hi,
not sure if you can do this on your own, but you can try to check html of your blog page and see whats the id of body tag and include this string to $excluded array in jk_opengraph.php file.

protected $excluded = array( 'xipblog_single', 'your-blog-page-body-id-here', );

@AureAureAure
Copy link
Author

AureAureAure commented Oct 27, 2020

Thank you very much for your help! That's very kind of you. My blog's body tag id is "ybc_blog_page", so in jk_opengraph.php I put this code :

protected $excluded = array(
        'xipblog_single', 'ybc_blog_page',
    );

Instead of this one :

   protected $excluded = array(
        'xipblog_single',
    );

And the problem remains... I cleared the cache and everything. That's really strange.

I managed to bypass the problem by deleting "{$tags.title}" from the og:title meta property in opengraph.tpl so that the og:title tag content becomes empty. Now Facebook is using the real og:title because the second one is empty. That's a solution but there are still two.

@yusttas
Copy link
Owner

yusttas commented Oct 28, 2020

The value in $excluded must be the value of $this->context->controller->php_self that you get on your blog page. It might be not the same as your body id, im not sure. You can try to get that value by typing echo $this->context->controller->php_self;die; in hookDisplayHeader() method.

@AureAureAure
Copy link
Author

I'm sorry for the delay, I got your message but couldn't try it yet. Will try to understand how to get this value. Thank you so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants