“Your setup of State has an old syntax (entity=1)”

This Dolibarr log message does not stop anything from working, and one click fixes it. If Dolibarr shows a blank page or an error 500, the cause is elsewhere, often an old file left over from the previous version.

Want someone to look at your instance? Diagnosis, fixed price €90.

Versions concerned
Message present in the code of Dolibarr 22.0.4 and 24.0.3 · tested on Dolibarr 24.0.3
What was checked (versions, tests, code read)

Tested on 15 November 2026 on a fresh Dolibarr 24.0.3 instance (MariaDB 11.4): company state set back to the old format, message found in dolibarr.log, pages checked; Company/Organization saved with real clicks, value read back from the database, message gone afterwards; error 500 reproduced with an old module descriptor placed in core/modules, then fixed by removing it. Code read: societe/class/societe.class.php (setMysoc) and admin/company.php in 24.0.3, societe.class.php in 22.0.4.

After upgrading Dolibarr, often from an old version, you open the log (dolibarr.log, in the documents folder) and find this line, repeated on every page:

ERR  Your setup of State has an old syntax (entity=1). Go in Home - Setup - Organization then Save should remove this error.

Most of the time you went to the log because something is wrong: a blank page, an error 500. And this line marked “ERR” looks like the culprit.

It is not. This message does not stop anything from working. One click fixes it, and if Dolibarr is still broken afterwards, the real cause is somewhere else.

What the message means

Dolibarr stores the state (or province, county, region) of your company in a setting. Current versions write it as “number:code:name”, for example 372:67:Bas-Rhin. An old installation may have kept the old format: the number alone, 372.

When Dolibarr finds the old format, it writes this message to the log, looks up the state code and name in the database by itself, and carries on. That is all.

  • Nothing shows on screen. The message only exists in the log.
  • No page is blocked. We checked: with the old format, the home page and the setup pages open normally.
  • “entity=1” is the number of your company inside Dolibarr. With a single company, it is 1.

A similar message exists for the country: “Your country setup use an old syntax”. Same cause, same fix.

The fix: one click

  1. Go to Home > Setup > Company/Organization.
  2. Check that the state shown is the right one (Dolibarr finds it by itself).
  3. Click Save, without changing anything.

Dolibarr rewrites the setting in the current format. In our test the value went from 372 to 372:67:Bas-Rhin, and the message never came back in the log.

If you get an error 500 when you click Save

This is the trap. When this page is saved, Dolibarr also enables the modules required for your country, and to do that it loads the module files. If an old module file, left over from your previous version, is still in the core/modules folder, PHP stops dead. The PHP error log (the web server’s one, not dolibarr.log) then contains a line like this:

PHP Fatal error:  Declaration of modactivite::init() must be compatible with
DolibarrModules::init($options = '') in …/core/modules/modactivite.class.php
Stack trace:
#0 …/admin/company.php(…): activateModulesRequiredByCountry()

We reproduced it: with an old file of this kind, every page opens, but Save gives an error 500. Once the file is removed, saving works and the setting is fixed.

The module name depends on your history (modactivite comes from version 3). What matters is the path: a file in core/modules that no longer exists in the version you installed.

The real fix is not to delete files one by one: it means the copy of the Dolibarr files is dirty. The old files were kept and the new ones were put on top. Replace the whole Dolibarr folder with the one from the new version, keeping only conf/conf.php, the documents folder and the custom/ folder. The full method is in Dolibarr upgrade: checklist and upgrade path.

If Dolibarr is still broken

The “old syntax” message is not the cause. Look for the real error in the server’s PHP error log, at the moment the page fails: the method is in Dolibarr error 500 or blank page, and our diagnostic tool recognises the message if you paste it.

How this was checked

  • Fresh Dolibarr 24.0.3 instance, on 15 November 2026. Company state set back to the old format (372, Bas-Rhin): the message appears in dolibarr.log on every page, and the pages open normally.
  • Company/Organization > Save with real clicks: “Setup saved”, value read back from the database as 372:67:Bas-Rhin, no message on the following pages.
  • Old module descriptor modactivite.class.php placed in core/modules: error 500 on save with the message above; file removed, save successful.
  • Code read: Societe::setMysoc() (societe/class/societe.class.php) and admin/company.php in 24.0.3; same message in the 22.0.4 code.
  • Real case: a French Dolibarr forum thread from December 2025 (upgrade from 3.3 to 22.0.4), solved by deleting the old file.

Frequently asked questions

Is “Your setup of State has an old syntax” serious?

No. Dolibarr writes it to its log (dolibarr.log) when your company's state or province is stored in the old format, then finds the state by itself and carries on. Nothing is shown on screen and no page is blocked.

How do I make the message go away?

Home > Setup > Company/Organization, then Save, without changing anything. Dolibarr rewrites the state in the current format and the message does not come back.

What does entity=1 mean?

It is the number of the company inside Dolibarr (the entity). With a single company it is always 1. It is not an error in itself.

I get an error 500 when I click Save: why?

Saving Company/Organization also loads the modules. If an old module file from the previous version was left in the core/modules folder, PHP stops with “Declaration of mod…::init() must be compatible with DolibarrModules::init($options = '')”. Remove that file, or better, copy all the files of the new version cleanly.

Dolibarrold syntaxentity=1MAIN_INFO_SOCIETE_STATEstateprovincedolibarr.logupgradeerror 500must be compatible

Did this guide help you?

A question about this guide, or a step that does not go as expected on your side? Write to support@dolix.fr.