# Bug COMMS-833 - Documents don't work properly with rails relative url

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-833

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Modules and project features / Documents |
| Target versions | 17.7.0 |
| Observed in versions | 17.4.0 |
| Sprint | Sprint 8 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.4.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

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

## Costs

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

## Description

### Steps to reproduce

0\. Run an openproject instance behind a relative url like /openproject

``` text
docker run --rm -e OPENPROJECT_HOST__NAME=localhost:9090 -e SECRET_KEY_BASE=42 -e OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/openproject -e OPENPROJECT_HTTPS=false -p 9090:80 -it openproject/openproject:17.4
```

1.  Log into OpenProject and open a browser console network tab, where you can observe if GET requests come back with 404.

2.  Use the document module of OpenProject and create a new document

### 

What is the buggy behavior?

  - blocknote css can't be found

  - documents url does not contain the prefix

  - the relative root url is not correctly applied

### What is the expected behavior?

<br>

1.  The correct relative root url (e.g. /openproject) should be respected
    
    <br>

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921285/content"> <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921287/content">

### Environment information

<br>

**OpenProject version**

*17.4*
