We have placed the Sharethis block on each node page. This is NOT the widget. The urls generated are to node/[nid] and not the full path.
Based on https://www.drupal.org/node/2699705 and https://www.drupal.org/node/2755679, this doesn't seem to be the intent.
For now, a quick fix might be to use \Drupal::request()->getUri();. This doesn't use dependency injection, but it works.
Please let me know if this isn't the intent of the module. If it's not a universal intent, maybe we add a variable to the configuration object sharethis.settings.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 2880471-15-fix-block-url-reroll.patch | 1.41 KB | mrinalini9 |
| #10 | 2880471-9-fix-block-url-reroll.patch | 1.41 KB | greg boggs |
| #8 | interdiff-6-8.txt | 820 bytes | piggito |
| #8 | absolute_url_with-2880471-8-do-not-test.patch | 1.5 KB | piggito |
| #6 | absolute_url_with-2880471-6.patch | 1.23 KB | andypost |
Comments
Comment #2
damontgomery commentedHere is the patch. Created from 8.x-2.0-beta3.
Comment #4
basil_snowman commentedchanged patch to 8.x-2.x version of the module.
Comment #5
andypostYou should use request stack & master request
Comment #6
andypostLooks in service better to use current request
Comment #7
andypostPatch has collision with #2860382: Title can be a plain text
Comment #8
piggito commentedRegarding the collision with issue Title can be a plain text , I'm adding a combined patch which includes:
Comment #9
greg boggsSame issue as: https://www.drupal.org/project/sharethis/issues/2978770 which also fixes the issue.
Comment #10
greg boggsAdding a reroll of this one just incase it's helpful.
Comment #11
greg boggsComment #12
naveenvalecha@Greg Boss
Please don't make your patches RTBC. See the process https://www.drupal.org/issue-queue/status#rtbc
Comment #13
greg boggsFor clarity and proper credit, this patch is Piggito's. I just rerolled it when I reviewed it to remove the bit we took care of in the other issue.
From the RTBC documentation you linked, since it was someone else's work, and I tested it:
"At the end of the day, setting an issue to this status is a judgment call: if you have thoroughly tested and reviewed the patch and believe it is ready, you may change the status; if you are unsure, the status should not be changed. Simply add the findings of your review to the issue."
Comment #14
naveenvalecha#13 Fair enough
The patch needs reroll before it gets committed.
Comment #15
mrinalini9 commentedRerolled patch #10, please review.
Comment #16
mrinalini9 commentedComment #17
naveenvalechaThanks!
Committed and pushed to 8.x.2.x