News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Auto Tweet Embed

Started by vbgamer45, January 11, 2015, 03:21:09 PM

Previous topic - Next topic

GantryZ

#260
Recently installed 3.0 of this mod, initially installed on SMF 2.0.19 and upgraded to 2.1.3 but same issue - tweets with ? in the URL don't load, they give a "Tweet error (does not exist)" directly above the URL.  If I modify the post and remove the ? and everything after it - loads no problem.   I know 3.0 is supposed to fix so I likely missed a step in the install/config. 

Anything I should check?  Tried 777/775/755 on tweet-cache.php, SELinux is not running. 

vbgamer45

It's a known bug i guess last fix didn't work for now remove after the ?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Julius_2000

Hi @vbgamer45,

We noticed that lots of most recent tweets do not embed any longer. Meanwhile, older tweets do still get displayed, though. Can anyone replicate this?

Here are two examples:

This works:
https://twitter.com/ChemBros/status/616702940934377472

That doesn't:
https://twitter.com/ChemBros/status/1671587253066297344

Gryzor

Quote from: Julius_2000 on June 21, 2023, 06:16:31 PMHi @vbgamer45,

We noticed that lots of most recent tweets do not embed any longer. Meanwhile, older tweets do still get displayed, though. Can anyone replicate this?

Here are two examples:

This works:
https://twitter.com/ChemBros/status/616702940934377472

That doesn't:
https://twitter.com/ChemBros/status/1671587253066297344
For me it does work on my forum...

https://www.cpcwiki.eu/forum/cpcwiki-discussion/test-20533/new/#new

Julius_2000

Hm. Weird. I don't know how to tackle this. Old, already posted Tweets get displayed, new ones just won't get fetched.
I tried uninstalling and re-installing, checked the php files that would be changed by the mod for redundant code, and I tested it on a test forum with only these mods installed: Spoiler, Optimus, ThemeToggle and the latest 2.1.4 update.

Gryzor


Julius_2000

Hi,
This is a topic which contains lots of Tweet embeds. I made a comparison post of an old Tweet from its first page and the non-working one I mentioned above:
https://forum.thechembase.com/index.php?msg=32791

Gryzor

Can you try putting it into a separate post?

Julius_2000

#268
I split my post

https://forum.thechembase.com/index.php/topic,3283.0.html

Another strange thing: I just uninstalled and deleted the mod and uploaded a "fresh" version (it's the same version actually). But now, none of the tweets get fetched at all. Checked load.php and Modifications.english.php, all contain the required code. Tweet-cache.php is also in the root directory.

Doesn't even work on a vanilla Default theme..

Man, this gives me headaches..

Edit:
My error log on the ftp server shows this message multiple times:
Quote[Thu Jun 22 11:07:54.903700 2023]
[proxy_fcgi:error] [pid redacted:tid #]
[remote redacted] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/home/myforum/data2/tweet-cache.php:82\nStack trace:\n#0 /usr/home/myforum/data2/tweet-cache.php(46): add_cache()\n#1 /usr/home/myforum/data2/tweet-cache.php(21): check_cache()\n#2 {main}\n  thrown in /usr/home/myforum/data2/tweet-cache.php on line 82', referer: https://test.myforum.com/index.php/topic,3007.msg28826.html

Gryzor

Actually I meant putting the problematic tweet into its own post.

On the link you provided, fwiw I still see the first tweet perfectly. 

Julius_2000

I deleted the working one.

Gryzor

Ah yeah it fails by itself too, damn. I asked for it because some versions back only the first tweet in a post would embed for us... 

Julius_2000

Are you able to check the server error log to see if there's a similar error like the one above noted?

Gryzor

Unfortunately not for a few days but since for me it embeds fine I doubt I'll find anything...

Julius_2000

Do you happen to know what php version you use? We've got 8.2.3 running at the moment.

vbgamer45

Posted an update that might help

4.0
!Updated the api call for twitter. Also better handling if no content returned.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Julius_2000

Thank you, that's much appreciated. Before I un- & re-installed v3.0, some older tweets were still working. Now, no tweet gets fetched at all (I believe I checked the "deleted all associated files" ).

Unfortunately, v4.0 is also not working on our test forum. Well, not quite, at least I now get a "Tweet error (does not exist").




vbgamer45

Do you have curl installed?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Julius_2000

#278
As far as I can see in the mods, no. And I believe we never had.

Edit:
I see the following in the PHP info tab in admin:
cURL support    enabled
cURL Information    7.87.0
....
(there's more info in that segment)


We get a lot of notes like this in the error log for tweets:

Quote[Thu Jun 22 11:07:54.903700 2023]
[proxy_fcgi:error] [pid redacted:tid #]
[remote redacted] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/home/myforum/data2/tweet-cache.php:82\nStack trace:\n#0 /usr/home/myforum/data2/tweet-cache.php(46): add_cache()\n#1 /usr/home/myforum/data2/tweet-cache.php(21): check_cache()\n#2 {main}\n  thrown in /usr/home/myforum/data2/tweet-cache.php on line 82', referer: https://test.myforum.com/index.php/topic,3007.msg28826.html
Can you make sense of what's in there? Like "Cannot access offset of type string..."

Could it be that the tweets that are still working on our public forum are just cached and that's why we are still seeing them? The test forum won't display anything any longer after the un-/reinstallation except for the error message.

vbgamer45

That error was fixed in the last update. Only returned if json from the twitter api could not be called.


Yes, it could be from cached tweets.
Your webhost could be blocking an external fetch?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: