Magic OGP links: thumbnails and descriptions

Doesn't work on a single style - Magic OGP links: thumbnails and descriptions

Doesn't work on a single style

by Lord Phobos » Wed May 15, 2024 11:55 pm

Hi

I have five styles installed on my board.

On a single style, OGP doesn't get parsed.

The error I get, looking at Chrome Inspect tool, is this:

Code: Select all

magicogp.js?assets_version=557:7 Uncaught TypeError: Cannot read properties of undefined (reading 'title')
    at HTMLAnchorElement.<anonymous> (magicogp.js?assets_version=557:7:25)
    at Function.each (jquery-3.6.0.min.js?…_version=557:2:3003)
    at S.fn.init.each (jquery-3.6.0.min.js?…_version=557:2:1481)
    at parseOgp (magicogp.js?assets_version=557:5:38)
    at magicogp.js?assets_version=557:20:5
    at magicogp.js?assets_version=557:28:3
(anonime)	@	magicogp.js?assets_version=557:7
each	@	jquery-3.6.0.min.js?assets_version=557:2
each	@	jquery-3.6.0.min.js?assets_version=557:2
parseOgp	@	magicogp.js?assets_version=557:5
(anonime)	@	magicogp.js?assets_version=557:20
(anonime)	@	magicogp.js?assets_version=557:28
What should I look to solve?

Thanks a lot.
Lord Phobos
Registered User
Posts: 932
Joined: Tue May 18, 2004 11:41 pm

Re: Doesn't work on a single style

by Ger » Sun Jun 16, 2024 7:22 am

It refers to this line: https://github.com/GerB/magicogp/blob/m ... cogp.js#L7
That assumes there is data-ogp="...." on the [url] tag which is set in the ogpParser class. Somehow that's not triggered at your style.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: Doesn't work on a single style

by Lord Phobos » Sun Jun 16, 2024 12:57 pm

How can I possibly solve?
Lord Phobos
Registered User
Posts: 932
Joined: Tue May 18, 2004 11:41 pm

Re: Doesn't work on a single style

by Ger » Mon Jun 17, 2024 8:20 pm

Fix the style... It messes with standard styling and I have no idea what it's doing. Contact the style author.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
Ger
Registered User
Posts: 2116
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100