[GH-ISSUE #962] Wrong application path for asset/eventBus.js #424

Closed
opened 2026-02-25 23:34:12 +03:00 by kerem · 3 comments
Owner

Originally created by @nakal on GitHub (Aug 10, 2024).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/962

Data

  • Shiori version: 1.7.0
  • Database Engine: PostgreSQL
  • Operating system: FreeBSD
  • CLI/Web interface/Web Extension: Web interface

Describe the bug / actual behavior

Shiori server is running with Nginx in the subpath /shiori. Most assets are loaded properly except eventBus.js. The relevant piece shows that the asset url might be wrong:

<script type="module">
                import basePage from "./assets/js/page/base.js";                                  import pageHome from "./assets/js/page/home.js";
                import pageSetting from "./assets/js/page/setting.js";
                import customDialog from "./assets/js/component/dialog.js";
        import EventBus from "../assets/js/component/eventBus.js";

In the last import you can see "../".

Expected behavior

The asset should probably be loaded from the correct webroot.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://host/webroot'
  2. Examine the web page source.
Originally created by @nakal on GitHub (Aug 10, 2024). Original GitHub issue: https://github.com/go-shiori/shiori/issues/962 ## Data - **Shiori version**: 1.7.0 - **Database Engine**: PostgreSQL - **Operating system**: FreeBSD - **CLI/Web interface/Web Extension**: Web interface ## Describe the bug / actual behavior Shiori server is running with Nginx in the subpath `/shiori`. Most assets are loaded properly except `eventBus.js`. The relevant piece shows that the asset url might be wrong: ``` <script type="module"> import basePage from "./assets/js/page/base.js"; import pageHome from "./assets/js/page/home.js"; import pageSetting from "./assets/js/page/setting.js"; import customDialog from "./assets/js/component/dialog.js"; import EventBus from "../assets/js/component/eventBus.js"; ``` In the last import you can see "../". ## Expected behavior The asset should probably be loaded from the correct webroot. ## To Reproduce Steps to reproduce the behavior: 1. Go to 'https://host/webroot' 2. Examine the web page source.
kerem 2026-02-25 23:34:12 +03:00
  • closed this issue
  • added the
    type:bug
    label
Author
Owner

@isamert commented on GitHub (Aug 17, 2024):

I am also experiencing this, as a workaround I use the following in my nginx configuration for shiori:

        sub_filter ../assets/js/component/eventBus.js ./assets/js/component/eventBus.js;
<!-- gh-comment-id:2294823087 --> @isamert commented on GitHub (Aug 17, 2024): I am also experiencing this, as a workaround I use the following in my nginx configuration for shiori: ``` sub_filter ../assets/js/component/eventBus.js ./assets/js/component/eventBus.js; ```
Author
Owner

@Monirzadeh commented on GitHub (Aug 17, 2024):

@fmartingr do I miss something in #916?

<!-- gh-comment-id:2294826481 --> @Monirzadeh commented on GitHub (Aug 17, 2024): @fmartingr do I miss something in #916?
Author
Owner

@fmartingr commented on GitHub (Aug 27, 2024):

I think this is the issue: #971

<!-- gh-comment-id:2313031518 --> @fmartingr commented on GitHub (Aug 27, 2024): I think this is the issue: #971
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#424
No description provided.