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

extension shariff inside news produces big log files with errors #2528

Closed
daUhradone opened this issue Sep 18, 2024 · 4 comments
Closed

extension shariff inside news produces big log files with errors #2528

daUhradone opened this issue Sep 18, 2024 · 4 comments

Comments

@daUhradone
Copy link

news: 11.4.2
PHP: 8.3
TYPO3 12.4.20

This is my Shariff.html Parial/Detail:

<div xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper">
    <rx:shariff services="linkedin,xing,twitter" enableBackend="true" />
</div>

Every time a user clicks on a shariff social media button an error is written in the log file: var/log/typo3_shariff_scexxxxxxx.log:

Wed, 18 Sep 2024 19:03:08 +0200 [WARNING] request="383ac3225d097" component="Reelworx.RxShariff.Shariff": Client error: `GET https://www.reddit.com/api/info.json?url=https%3A%2F%2Fwww.albdental.de%2F` resulted in a `403 Blocked` response:
<body class=theme-beta><div><style>.theme-light,:root{--rem360:22.5rem;--rem320:20rem;--rem192:12rem;--rem144:9rem;--rem (truncated...)
- ClientException: Client error: `GET https://www.reddit.com/api/info.json?url=https%3A%2F%2Fwww.albdental.de%2F` resulted in a `403 Blocked` response:
<body class=theme-beta><div><style>.theme-light,:root{--rem360:22.5rem;--rem320:20rem;--rem192:12rem;--rem144:9rem;--rem (truncated...)
, in file /html/typo3-12/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111 - {"exception":"GuzzleHttp\\Exception\\ClientException: Client error: `GET https://www.reddit.com/api/info.json?url=https%3A%2F%2Fwww.albdental.de%2F` resulted in a `403 Blocked` response:\n<body class=theme-beta><div><style>.theme-light,:root{--rem360:22.5rem;--rem320:20rem;--rem192:12rem;--rem144:9rem;--rem (truncated...)\n in
...

reddit is not active but it looks like it produces an error anyway.

At the footer of my normal page shariff set with a viewhelper is not producing any errors:

<f:render partial="Shariff" />

@georgringer
Copy link
Owner

@liayn something for you?

closing issue as not related to news

@liayn
Copy link
Contributor

liayn commented Sep 25, 2024

@daUhradone This is not generated upon clicking an icon, but whenever a news record is rendered.
You have enabled "the backend" (enableBackend="true"), hence it tries to fetch sharing counts from the various providers. Reddit obviously blocks this.
So, either change this to 0 (or remove the attribute) or reconfigure shariff in the extension settings (Install Tool) and only enable the services you really want. (https://bitbucket.org/reelworx/rx_shariff/src/fb8e1e7ad781813cba01560aede0776d56726765/ext_conf_template.txt#lines-2)

@daUhradone
Copy link
Author

Thank you! Found the settings in Admin Tools settings to take Reddit out. Before I adjusted the social media platforms only in the news Parial for shariff.
But didn't find where I should find the 'enableBackend= "true"'? Is this a general setting, a news setting or a shariff setting? And where is it defined?

@liayn
Copy link
Contributor

liayn commented Sep 26, 2024

You have it in your Fluid template, as posted above:

<div xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper">
    <rx:shariff services="linkedin,xing,twitter" enableBackend="true" />
</div>

You can define per shariff-usage whether it should contact the shariff-backend and ask for stats or not.

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

3 participants