SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
577 stars 348 forks source link

The Twitter Share lava on stock Content Channel Item View is broken. #4236

Closed MicahO closed 4 years ago

MicahO commented 4 years ago

Description

The twitter sharing functionality built into the Content Channel Item View is broken. It may have been copied and pasted from another source; it refers to Calendar Items for no apparent reason.

Steps to Reproduce

  1. Go to https://rocksolidchurchdemo.com/page/460?Item=21.
  2. Click the Twitter icon to share on Twitter.
  3. Notice that Twitter loads, but nothing is shared.

Expected behavior:

When clicking the "Share on Twitter" button, the current page should be shared on Twitter. Ideally it would use a Javascript mini-window similar to the functional Facebook one.

Actual behavior:

When clicking the "Share on Twitter" button, Twitter opens but nothing is shared.

Versions

┆Attachments: image.png

MicahO commented 4 years ago

The proper URL seems to be:

http://twitter.com/share?text={{ Message }} &url={{url}}

MicahO commented 4 years ago

We've resolved this issue on our site, implementation is here: https://whitewatercrossing.org/watch

We've also built an improved email/sms share that we're pretty happy with. Is this something you'd be interested in for core?

MicahO commented 4 years ago

<script>function tws_click() { u = location.href; t = document.title; window.open('http://twitter.com/share?text=Watch online with me! ' + encodeURIComponent(u) + '&url=https://whitewatercrossing.org/watch', 'toolbar=0,status=0,width=626,height=436'); return false; }</script>

and

<a href="http://twitter.com/share?text=Join me for church this Sunday! &url=https://whitewatercrossing.org/watch" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=650,height=700'); return false;" data-toggle="tooltip" title="Share on Twitter" onclick="return tws_click()" target="_blank" class="socialicon socialicon-twitter" title="" data-original-title="Share via Twitter">

nairdo commented 4 years ago

I re-traced this fix and I believe it is in this migration roll-up commit: https://github.com/SparkDevNetwork/Rock/commit/75b0d46c217293b68262e494c2b27275ac5e652d (v11.1) / https://github.com/SparkDevNetwork/Rock/commit/05573e70bbe8960c2cef449c084385f325b4a0c5 (pre-alpha v12) In there, it will replace the stock "Content Channel Item View" block instance on the stock "Series Detail" page.

@MicahO I'd also appreciate it if you tested this during the beta and let us know if you encounter anything wrong.