Skip to content

fix: remove broken owncloud.com/federation link from federation settings - #41608

Merged
DeepDiver1975 merged 4 commits into
masterfrom
fix/federation-broken-owncloud-com-url
Jun 11, 2026
Merged

fix: remove broken owncloud.com/federation link from federation settings#41608
DeepDiver1975 merged 4 commits into
masterfrom
fix/federation-broken-owncloud-com-url

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Summary

  • The "Add to your website" button in personal federation settings generated a link to https://owncloud.com/federation#<cloudID> which redirects to an unrelated owncloud.com marketing page after a site restructuring
  • Removed the broken external URL; the federation Cloud ID is now displayed directly in the badge and HTML snippet
  • Twitter sharing now uses message_without_URL (was incorrectly using message_with_URL which embedded the broken URL)

Test Plan

  • Navigate to personal settings → Federated Cloud section
  • Confirm "Add to your website" expands and shows the Cloud ID badge without a broken link
  • Confirm the HTML code snippet uses <span> with the Cloud ID instead of <a href="https://owncloud.com/federation#...">
  • Confirm social sharing buttons no longer include the defunct URL

Fixes #40501

🤖 Generated with Claude Code

@DeepDiver1975 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes the defunct https://owncloud.com/federation#<cloudID> URL from the federated sharing personal settings panel and replaces the linked badge with a plain <span> that displays the Cloud ID inline.

The fix is clean and correct. A few notes:

message_with_URL still assigned but now contains the Cloud ID instead of a URL: GeneralPersonalPanel.php now passes $cloudID as the second argument to message_with_URL, making it effectively identical to message_without_URL. The Twitter button correctly switched to message_without_URL. Consider whether message_with_URL is still needed at all, or whether it can be removed to reduce dead template variables — not a blocker, but worth a follow-up.

<xmp> tag: The HTML snippet preview still uses the deprecated <xmp> element (pre-existing, not introduced here). Not a regression from this PR.

Changelog entry: changelog/unreleased/40501 is present and well-written. Good.

The core fix (removing the broken external link) is solid and the UX impact is minimal — users lose a broken link and gain a directly visible Cloud ID. Safe to merge.

@DeepDiver1975
DeepDiver1975 force-pushed the fix/federation-broken-owncloud-com-url branch 2 times, most recently from 85fbc3a to e71a606 Compare June 10, 2026 11:05

@DeepDiver1975 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated revision — diff is identical to the previously reviewed version. The changelog entry title was tweaked slightly ("Remove broken owncloud.com/federation link" → "Remove owncloud.com/federation link"), but all code changes are unchanged. Previous review comments still apply; no new concerns from this revision.

@phil-davis phil-davis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, and tests so far are passing.

@DeepDiver1975 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Overview: Removes a dead link (https://owncloud.com/federation#) from the federated cloud sharing personal settings panel. The external page no longer exists after owncloud.com was restructured.

Changes:

  • GeneralPersonalPanel.php: Drops $url variable, passes $cloudID directly as both message_with_URL and reference template vars — the Cloud ID is already the meaningful identifier, the defunct URL added no value
  • settings-personal-general.php: Twitter share button switches from message_with_URL to message_without_URL (correct — there's no longer a URL to share); the "Add to your website" badge replaces <a href="..."> with <span> and appends the Cloud ID inline
  • GeneralPersonalPanelTest.php: Adds $mockUser->method('getCloudId')->willReturn('user@cloud.example.com') stub — previously missing, which would have caused a null return from getCloudId() and a broken test against the now-removed $url construction
  • changelog/unreleased/40501: Well-written entry clearly explaining the "Add to your website" breakage

One minor observation: The message_with_URL template variable is now populated with just the Cloud ID (same as message_without_URL), making the two variables redundant. A follow-up cleanup could consolidate them, but it's not a blocker for this fix.

Overall: Clean, minimal fix. The test addition is a welcome improvement. No concerns.

DeepDiver1975 and others added 4 commits June 11, 2026 21:34
The "Add to your website" feature linked to https://owncloud.com/federation#
which stopped working after owncloud.com was restructured. Replace the
broken external link with the plain federation Cloud ID so the snippet
displayed to users is still useful.

Fixes #40501

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
The test's IUser mock never returned a value for getCloudId(), which
was previously harmless because the panel concatenated it into a URL
string (null → ""). After removing the broken owncloud.com/federation
link, cloudId is passed directly as the 'reference' template variable,
causing urlencode(null) to throw an ErrorException on PHP 8.3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 force-pushed the fix/federation-broken-owncloud-com-url branch from 4edd744 to 680989b Compare June 11, 2026 19:34
@DeepDiver1975
DeepDiver1975 merged commit 0489d0c into master Jun 11, 2026
26 checks passed
@DeepDiver1975
DeepDiver1975 deleted the fix/federation-broken-owncloud-com-url branch June 11, 2026 20:27
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.

[QA] Add to your website link is useless

2 participants