Explicitly support hashtags as fallbacks

Created on 9 January 2015, over 9 years ago
Updated 28 August 2023, 10 months ago

Problem/Motivation

Currently the Twitter Block settings ask for username to use for fallback link in case of no JS. However, the actual implementation (simply appending the content of username field to "https://twitter.com/") makes it possible to use hashtags just as well (Twitter redirects https://twitter.com/#drupal to https://twitter.com/hashtag/drupal).

It is possible to use as-is, but doing so will confuse the semantics of the database and create potential future incompatibilities.

Proposed resolution

The username field should be renamed to something more generic, like "Twitter target". This would mean a fairly straightforward task of renaming the table field and all references to it, and changing the help text, and rephrasing the fallback link text to fit both usernames and hashtags or inserting logic to select phrasing dependent on the first character (@ or #).

Another option would be to support both types separately, but the advantages of such approach should be made evident because it involves making both code and UI more complicated.

Remaining tasks

Patch needed to rename field, change block settings, rewrite link text. Testing.

User interface changes

Minor changes to block settings, small text change in front end.

API changes

None.

✨ Feature request
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇫🇮Finland holist

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024