# Phoenix bug when amending excerpts

**URL:** <https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56>\
**Category:** Phoenix\
**Created:** [July 11, 2020, 9:49pm UTC](https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56 "2020-07-11T21:49:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arlo](https://tosdr.community/user_avatar/tosdr.community/arlo/32/24_2.png) [@Arlo](https://tosdr.community/u/Arlo)\
**Post date:** [July 11, 2020, 9:49pm UTC](https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56/1 "2020-07-11T21:49:31Z")

</div>

It doesn’t seem to like including the original excerpt as a substring.

works: ![image](https://tosdr.community/images/transparent.png)

doesn’t work: ![image](https://tosdr.community/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![justin](https://tosdr.community/user_avatar/tosdr.community/justin/32/1657_2.png) [@justin](https://tosdr.community/u/justin)\
**Post date:** [July 11, 2020, 10:15pm UTC](https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56/2 "2020-07-11T22:15:53Z")

</div>

+1, my fix was to decline my own point and create a new one which of course isn’t feasable for non contributors.

Possible solution would be not to render links when clicking on “Change Excerpt”

Sadly I have little to none experience in ruby and I am not able to make a PR myself. Maybe @michielbdejong could chime in?

---

<div class="post-metadata">

**Author:** ![justin](https://tosdr.community/user_avatar/tosdr.community/justin/32/1657_2.png) [@justin](https://tosdr.community/u/justin)\
**Post date:** [July 11, 2020, 10:32pm UTC](https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56/3 "2020-07-11T22:32:40Z")

</div>

Looked through Github and found this line:

> <https://github.com/tosdr/edit.tosdr.org/blob/28d714d9eaef6863337bcece4dc076cbd790fcaa/app/views/services/annotate.html.erb#L73-L77>

Possibly add an `if` to compare for a matching ID.

`if snippet[:pointId] == @point.id` or something like that. Which wouldn’t be a problem as the “Change Excerpt” button adds the GET parameter point\_id

```auto
https://edit.tosdr.org/services/SERVICE_ID/annotate?point_id=POINT_ID

```

(Line 36 makes use of the GET parameter as well)

> <https://github.com/tosdr/edit.tosdr.org/blob/28d714d9eaef6863337bcece4dc076cbd790fcaa/app/views/services/annotate.html.erb#L36>

Github: [Remove link when changing an excerpt · Issue #921 · tosdr/edit.tosdr.org · GitHub](https://github.com/tosdr/edit.tosdr.org/issues/921)

---

<div class="post-metadata">

**Author:** ![Dr\_Jeff](https://tosdr.community/user_avatar/tosdr.community/dr_jeff/32/2728_2.png) [@Dr\_Jeff](https://tosdr.community/u/Dr_Jeff)\
**Post date:** [October 5, 2020, 9:21pm UTC](https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56/4 "2020-10-05T21:21:57Z")

</div>

Unfortunately this error persists 😢

---

<div class="post-metadata">

**Author:** ![justin](https://tosdr.community/user_avatar/tosdr.community/justin/32/1657_2.png) [@justin](https://tosdr.community/u/justin)\
**Post date:** [October 5, 2020, 9:46pm UTC](https://tosdr.community/t/phoenix-bug-when-amending-excerpts/56/5 "2020-10-05T21:46:13Z")

</div>

Yes I have opened an issue on github for this however development is a bit slow as its voluntarily based.
