# Bug OP-8091 - Cannot edit markdown content with work package links in certain scenarios

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-8091

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 11.1.2 |
| Observed in versions | 11.1.0 |
| Sprint | 11.1.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 11.1.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

Your OpenProject Version: 11.1

### **Steps to reproduce:**

1.  Create a wiki page
2.  Insert the following content directly via db or rails console:

<!-- end list -->

``` text
User link: <span class="mention" data-type="">user#89</span>
```

Then try to edit the wiki page.

### **Actual Behavior**

The content of the wiki page is not visible when editing

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20204/content"></div></figure>

### **Expected Behavior**

The content of the wiki page should be visible when editing.

### 

Development Notes

  - How to detect the type group of an old mention
  - The old mentions would still appear with the id (<mention class="mention" data-id="12" data-type="work_package" data-text="#12">#12</mention>, @12) not with the name
  - Group mention are turned into an span, not a div
