Locked Solved Bug reports

Flatboard v5 Feedback

Locked by Fred · 02 Jan 2026 20:29 • Solved by Fred · 02 Jan 2026 20:29
Avatar
Posts 67

Here is the list of issues

  • Some of the paths only accepts root directory, which doesn't support subfolders. Example: http://localhost/Flatboard will not work since it only allows http://localhost
  • Documentation for plugins needs work because it's way to vauge to understand especally when I never delt with your updated plugins.
  • Error logging also needs work because it give ZERO details on why a plugin isn't loading.

Edited on Jan 05, 2026 By Gavin .

Avatar
Posts 67

Ok I guess updating the discussion isn't working:

Here is the list of issues

  • Some of the paths only accepts root directory, which doesn't support subfolders. Example: http://localhost/Flatboard will not work since it only allows http://localhost
  • Documentation for plugins needs work because it's way to vauge to understand especally when I never delt with your updated plugins.
  • Error logging also needs work because it give ZERO details on why a plugin isn't loading.

In summary: The front end looks good, but the backend and documentation just need a lot more work, because it confusing where the errors are coming from and the documentation is just very unclear on what you're suppose to do.

Edited on Dec 21, 2025 By Gavin .

Avatar
Posts 243
Thank you for your feedback! Here's what will be fixed in the next version:

The UrlHelper::full() method now detects if site_url already contains the subfolder and avoids duplication.

What was fixed:

If site_url = http://localhost/Flatboard and baseUrl = /Flatboard, the method detects that the subfolder is already present in site_url and does not add baseUrl again.

Result: http://localhost/Flatboard/discussion instead of http://localhost/Flatboard/Flatboard/discussion.

How it works:
  • The path of site_url is extracted using parse_url().
  • It's then compared with baseUrl.
  • If the subfolder is already present, only path is appended to site_url.
  • Otherwise, the usual construction is used with baseUrl + path.

This allows site_url to be used with the full subfolder (e.g., http://localhost/Flatboard) without duplication.

Avatar
Posts 67

Fred

Cool I'll let you know if there is more things to change

Avatar
Posts 67

Ok here is what I'm getting

  1. Console error

    TXT
    Uncaught TypeError: e.target.closest is not a function
     at HTMLDocument.<anonymous> (main.js:599:34)
  2. The create discussion button still relocatates to/discussions/create make sure its

Location:app/Views/discussions/index.php line:23

PHP
<?php
 // Construire l'URL selon le contexte
$createUrl = './discussions/create';
if ($selectedCategorySlug) {
  $createUrl .= '?category=' . urlencode($selectedCategorySlug);
}

Console error when creating a post

  1. POST http://localhost/d/3-test/posts 404 (Not Found) toast.js:361

Edited on Dec 23, 2025 By Gavin .

Avatar
Posts 243

Dou you have update to RC2 ?

Avatar
Posts 67

Fred

I do, it's still giving me those errors.

Avatar
Posts 243

I Was Able to Reproduce This Bug and I Will Update the Archives Within the Hour Updated!

Fixed Links in Main Views

  • app/Views/discussions/index.php: used UrlHelper::to() for the discussion creation and login links.
  • app/Views/discussions/show.php: used UrlHelper::to() for the new discussion link.
  • All themes (premium, bootswatch, mybb-classic): same corrections applied.

Improved Detection

  • The detectBaseUrl() function in UrlHelper uses multiple methods to detect the subfolder.

Installation

  • base_url is automatically detected and saved during installation.

How to Test

  1. Check that base_url contains /FLATBOARD5 in storage/json/config.json.

    If it doesn’t, you can:

    • Manually edit the config.json file and set "base_url": "/FLATBOARD5".
    • Or call \App\Helpers\UrlHelper::resetBaseUrl() once to force detection.
  2. Clear the PHP cache (restart PHP-FPM or the web server).

  3. Test the links:

    • The "Start a new topic" button → should redirect to /FLATBOARD5/discussions/create.
    • The "Forum" and "Admin" links → should include the subfolder.

Expected Outcome

The URLs should now work correctly with the subfolder. If the issue persists, check that base_url is correctly set in config.json.

Edited on Dec 23, 2025 By Fred .

Avatar
Posts 243

@Gavin you can try again, archive updated!

Avatar
Posts 67

Fred

Sure thing

Avatar
Posts 67

Fred

LOG

/d/3-test/posts:1  Failed to load resource: the server responded with a status of 404 (Not Found)  
3-test:3088 Error: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
(anonymous) @ 3-test:3088
main.js:626 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:626:34)
main.js:599 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:599:34)
(anonymous) @ main.js:599
main.js:626 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:626:34)
(anonymous) @ main.js:626
main.js:599 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:599:34)
(anonymous) @ main.js:599
main.js:626 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:626:34)
(anonymous) @ main.js:626
toast.js:361 POST http://localhost/d/3-test/posts 404 (Not Found)
(anonymous) @ toast.js:361
(anonymous) @ 3-test:3049
3-test:3088 Error: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
(anonymous) @ 3-test:3088
Promise.catch
(anonymous) @ 3-test:3087
main.js:599 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:599:34)
(anonymous) @ main.js:599
main.js:626 Uncaught TypeError: e.target.closest is not a function
at HTMLDocument.<anonymous> (main.js:626:34)
(anonymous) @ main.js:626

Some fetch locations are wrong here is the full console error.

  • File upload will only return the base /uploads which again no supporting subfolders
  • Updating discussions doesn't work
  • Creating post is also not possible (that is in error log)

Edited on Dec 24, 2025 By Gavin .

Avatar
Best answer set by Fred 1 month ago
Posts 243

URL Helper Fixes for Subdirectory Support

1. Fix for url-helper.js

  • Updated to use window.BASE_URL if available
  • Takes subdirectory into account in URLs

2. Fix for Hardcoded URLs in show.php

  • Replaced all /d/${numberSlug}/... URLs with window.url(\/d/${numberSlug}/...`)`
  • Replaced all /api/... URLs with window.url(\/api/...`)`
  • Fixed files:
    • app/Views/discussions/show.php
    • themes/premium/views/discussions/show.php
    • themes/bootswatch/views/discussions/show.php

3. Fix for Upload URLs

  • Using UrlHelper::to() for image, avatar, and attachment upload URLs
  • Returned URLs now include the subdirectory

Result

  • POST requests to /d/{number_slug}/posts work with subdirectory
  • Image uploads return URLs with subdirectory
  • Discussion actions (subscribe, pin, lock, etc.) work with subdirectory
  • API requests work with subdirectory

All URLs now use window.url() or UrlHelper::to(), which automatically take the subdirectory into account. The 404 errors and incorrect URL issues should be resolved.

Avatar
Posts 243

I just update to fix this issue and the "Error: Ressource not found."
Download and try again please.

This discussion is locked

Log in to reply
navigation.title
13Posts
post #1
21 Dec 2025
ByUtilisateur