# "Not Found" When Creating Draft or Adding Items

**URL:** <https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792>\
**Category:** Maintaining my Dolibarr\
**Tags:** Issue\
**Created:** [November 21, 2025, 8:04am UTC](https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792 "2025-11-21T08:04:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![romelwelltech](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/romelwelltech/32/3073_2.png) [@romelwelltech](https://www.dolibarr.org/forum/u/romelwelltech)\
**Post date:** [November 21, 2025, 8:04am UTC](https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792/1 "2025-11-21T08:04:32Z")

</div>

Hi Dolibarr Forum!

I’ve been facing this issue since version 22.0.2 and assumed upgrading to 22.0.3 would resolve it.

However, when creating a draft New Price Request or a Purchase Order, adding an item after clicking Add leads to a Not Found page.

I need help fixing this problem.

---

<div class="post-metadata">

**Author:** ![Kim\_KW1975](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@Kim\_KW1975](https://www.dolibarr.org/forum/u/Kim_KW1975)\
**Post date:** [November 21, 2025, 9:31am UTC](https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792/2 "2025-11-21T09:31:22Z")

</div>

please check your web server log, for example with apache at:  
`/var/log/apache2/`

`most of the time the log will give you more information about the root cause of the error.`

---

<div class="post-metadata">

**Author:** ![jonbendtsen](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jonbendtsen](https://www.dolibarr.org/forum/u/jonbendtsen)\
**Post date:** [November 21, 2025, 5:32pm UTC](https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792/3 "2025-11-21T17:32:59Z")

</div>

please also switch on DEBUG logging and look in the dolibarr.log file found in the documents/ folder

---

<div class="post-metadata">

**Author:** ![romelwelltech](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/romelwelltech/32/3073_2.png) [@romelwelltech](https://www.dolibarr.org/forum/u/romelwelltech)\
**Post date:** [November 22, 2025, 5:24am UTC](https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792/4 "2025-11-22T05:24:20Z")

</div>

@Kim_KW1975 Thanks, I’ll check the logs and see what turns up.

@jonbendtsen Thanks, I’ll enable that debug option and report back with what I find.

Just now, even opening the draft Expense Reports shows a Not Found error.

It seems that most of the modules might be experiencing the same issue.

Is there any other way to fix this issue for now?

Maybe a patch could work, or will it require reinstalling again?

---

<div class="post-metadata">

**Author:** ![romelwelltech](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/romelwelltech/32/3073_2.png) [@romelwelltech](https://www.dolibarr.org/forum/u/romelwelltech)\
**Post date:** [November 23, 2025, 1:51am UTC](https://www.dolibarr.org/forum/t/not-found-when-creating-draft-or-adding-items/30792/5 "2025-11-23T01:51:01Z")

</div>

## ✅ RESOLVED: “Not Found” (404) Error on Module Creation Pages (Draft PO, Expense, etc.)

I was encountering a 404 “Not Found” error every time I attempted to create a new resource (Draft Purchase Order, Expense Report, Price Request) in my Dolibarr installation, which is located in a subdirectory on a hosting environment.

The issue was a conflict caused by leftover, aggressive URL rewriting rules in the root directory’s `.htaccess` file, likely installed by an unused website builder like **Weebly**.

### 💡 Root Cause Analysis

The root `.htaccess` file was running a set of rules that attempted to handle all requests on the domain, including those intended for Dolibarr’s subdirectory.

These rules were capturing Dolibarr’s clean URLs (e.g., `../supplier_order/card.php`) and incorrectly routing them to an old Weebly handler or simply causing a generic 404 before Dolibarr’s system could process the request.

### 🛠 Resolution Steps

I manually cleaned up the conflicting code in the root directory’s `.htaccess`.

**1. Clean the Root `.htaccess` File**

I opened the root `.htaccess` file (located in `/public_html/.htaccess`) and deleted all lines between the `#Weebly Additions Start` and `#Weebly Additions End` markers.

**Crucially, I ensured I kept the cPanel-generated PHP handler block** (which configures the PHP version for the server).

**Before (Example Snippet):**

```htaccess
#Weebly Additions Start
ErrorDocument 404 /w_api/Handler.php
... many lines of RewriteRule and RewriteCond ...
#Weebly Additions End

# php -- BEGIN cPanel-generated handler, do not edit
... (Kept this PHP block) ...

```

**After (Example Snippet):**

```htaccess
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php80” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

```

**2. Delete Residual Weebly Files (Optional but Recommended)**

To ensure no other file conflicts, I deleted the Weebly-related handler folder and files from the root directory, such as the `w_api/` folder.

**Result:** After performing the cleanup, Dolibarr successfully loads all creation forms and pages, resolving the 404 errors.

If you are on shared hosting and encounter widespread 404 errors in a Dolibarr subdirectory, check your root `.htaccess` for unintended URL hijacking rules.
