Skip to content

Avoid requests to a missing Shariff backend - #56

Open
diegoabadan wants to merge 1 commit into
ojsde:stable-3_4_0from
diegoabadan:agent/avoid-missing-shariff-backend-3.4
Open

Avoid requests to a missing Shariff backend#56
diegoabadan wants to merge 1 commit into
ojsde:stable-3_4_0from
diegoabadan:agent/avoid-missing-shariff-backend-3.4

Conversation

@diegoabadan

Copy link
Copy Markdown

What changed

  • Check whether the shariff-backend directory exists at the OJS installation root.
  • Only render data-backend-url when that backend is installed.
  • Apply the behavior to both the regular plugin output and the sidebar block.

Why

The plugin always configured /shariff-backend, although the backend is optional. Installations without it consequently generated repeated HTTP 404 responses while displaying Shariff buttons.

Impact

Sharing buttons continue to work without the optional backend. Share counters are requested only when the backend directory exists, matching the documented behavior.

Validation

  • php -l ShariffPlugin.inc.php
  • php -l ShariffBlockPlugin.inc.php
  • git diff --check

Target: OJS 3.4.x (stable-3_4_0).

@diegoabadan
diegoabadan marked this pull request as ready for review August 19, 2026 22:50
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

Successfully merging this pull request may close these issues.

1 participant