department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
79 stars 59 forks source link

Whitelist Twitter/X links to prevent broken link alerts at top of nodes #16889

Open xiongjaneg opened 5 months ago

xiongjaneg commented 5 months ago

User Story or Problem Statement

"As an Drupal editor, I don't want to be alerted to a broken link to my Twitter/X page when it isn't really broken."

This is happening as Twitter/X has transitioned to requiring login to view Twitter/X pages.

To replicate

  1. Log in to any VAMC system page (e.g., https://prod.cms.va.gov/maine-health-care)
  2. See the broken link message for Twitter/X.
  3. Click the link to see the link is valid.
Screenshot 2024-01-17 at 2 44 31 PM

Acceptance Criteria

xiongjaneg commented 5 months ago

@maortiz-27-80 Submitted for your team's consideration, thank you!

BerniXiongA6 commented 5 months ago

@maortiz-27-80 I'm going to remove the needs analysis label and place this into pre-refinement review for us so it doesn't get lost.

xiongjaneg commented 4 months ago

Taking back into Facilities work related to X and because it mostly affects Facilities pages.

xiongjaneg commented 3 months ago

If Twitter/X is always behind a login wall, we would never know if it was a broken link. So the question may be moot.

xiongjaneg commented 3 months ago

@jilladams @FranECross Would you please review and discuss with Dave C. if there's any risk to your products if Twitter/X is whitelisted across the board?

xiongjaneg commented 3 months ago

Some events editors are adding links to Twitter. Events adds Twitter/X links on the front end.

Amanda referenced this use case Outreach And Events | VA Gaming Outreach: Regiment Gaming VA General Q&A | Veterans Affairs

xiongjaneg commented 3 months ago

prod.cms.va.gov/admin/config/content/node_link_report may be the place to add this

jilladams commented 3 months ago

Re: Events:

Some events editors are adding links to Twitter. Events adds Twitter/X links on the front end.

There isn't a field for Twitter stuff on Event nodes: https://prod.cms.va.gov/node/add/event. So: the CMS for Events is agnostic about Twitter, and Editors shouldn't be seeing broken link warnings, unless maybe an editor includes a Twitter URL in the rich text field for event description. In that case, yes, whitelisting may be necessary.

On Events in FE, there is a "Share to twitter" URL. That's built by the front-end. Spot checking from Outreach Events, that's working fine on most events, just requires a login if you're not already

Sidebar: Unrelated bug

I did just run into a bug while confirming all this: if an editor includes a pipe in the Event title, it causes the Twitter window to 400 error: https://www.va.gov/outreach-and-events/events/64661/:

I'll ticket that.

mmiddaugh commented 3 months ago

Spoke with @davidconlon about this - let's hold on proceeding pending a bigger conversation with Erika