Available for projects & agency overflow · Quick reply, from the person who does the work

When an update breaks a module or wipes your changes

The module worked, you accepted the update it offered, and it has been broken since — or it works, but the adaptations made for you have vanished. That isn’t bad luck: a major version change rewrites the module’s configuration, its tables and its files, and that transition is the most fragile moment of its life.

Describe my issue Send a message

What a module update actually does

Updating a module isn’t just replacing files. On PrestaShop as on WordPress, a well-written module runs an upgrade routine on the way: it can add database columns, rename configuration keys, migrate old settings into a new format, or attach itself to different display points.

Three things can go wrong. The routine stops halfway, and the database is left in an intermediate state the module can’t read back. Old settings aren’t carried over, and the module restarts on its defaults, which looks exactly like a module that does nothing. Or the new version requires a PHP or platform version higher than yours, and fails silently on load.

The most confusing case is the one where the module seems to work, but only part of its settings survived. You hunt for a bug where there is only lost configuration.

What to do, and in what order

  1. Don’t re-run the update repeatedly

    Re-running an upgrade routine that failed halfway can worsen the database, because it replays operations already performed. An intermediate state can be repaired; a state replayed three times much less so.

  2. Read the server error log

    An unmet version requirement, a missing method or a non-existent column appear there by name. That is what separates an incompatibility from lost settings.

  3. Compare configuration before and after

    If you have an earlier backup, the module’s configuration values are in it and can be compared. That is often where the full explanation sits.

  4. Roll back, if that is possible

    Downgrading is only safe if the database wasn’t altered by the upgrade. Otherwise restoring a full site backup is the only reliable way back.

The special case of payment and shipping modules

Those deserve separate attention, because their failure isn’t visible on the home page but at the last step of checkout, which is where you lose the sale. A new major version frequently changes how the module receives callbacks from the provider, and those callbacks arrive at an address registered with the provider, not inside your store. If the update changes that address, it has to be updated on both sides.

After any payment module update I place a real end-to-end order in production conditions and check that the order is created with the correct status. That is the only test that proves anything.

The other outcome: the update that wipes your changes

The opposite symptom exists and is often confused with the previous one: the module isn’t broken, it has simply gone back to what it was. An update replaces the module’s files with those of the new version. It doesn’t compare, it doesn’t merge, it overwrites. Everything written inside the module folder disappears, with no warning and no trace. The signature is recognisable: a bespoke feature that vanishes twice a year, always after maintenance, and that nobody links to the update because the interval is long.

The second effect is nastier: as long as the change holds, it effectively blocks updates. Since nobody wants to lose it again, the module stays on an old version, piles up incompatibilities and ends up producing exactly the failure described above, only worse, on the day the update becomes unavoidable.

When a module declares no extension point and builds its output without a template you can override, there is no elegant answer, and I would rather say so than suggest otherwise. Three options remain, in this order of preference: ask the module’s publisher to add an extension point, which costs nothing and is sometimes accepted; duplicate the module under another name and own it as yours, knowing you give up its updates and become its maintainer; or keep the change separately as a documented patch, to be reapplied after each update. What I don’t do: modify a module and say nothing. An undocumented change inside code someone will update in six months is a trap for the next person, including when that person is me.

Four ways to adapt a module without editing it

Related pages

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

attente
plateforme
historique (facultatif)
frequence-souhaitee (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Should I refuse module updates?
No. A module left un-updated eventually becomes incompatible with the platform and may carry known vulnerabilities. What must be avoided is the update applied straight to production with no backup and no prior test.
The module shows a database error since the update
That is the signature of an interrupted upgrade routine: an expected column or table doesn’t exist. The fix is to complete the missing migration, not to reinstall the module, which would lose existing data.
My settings have vanished, can they be recovered?
Often yes, if they are still in the database under their old keys, or in an earlier backup. That is data recovery work, separate from fixing the module itself.
How do I know a new version is compatible before installing it?
The module listing states the platform and PHP versions it requires, and the description file shipped with the module states them too. When the two disagree, the shipped file is what counts.
How do I know whether my changes were overwritten?
By comparing the module's files with the published version: the differences stand out. On a site with no version control that is the only way, and it is also why I put changes somewhere other than inside the module.
Does a template override in the theme really survive?
It survives module updates, yes. However, if the module changes its data structure, the overridden template may stop showing the right thing: it has to be rechecked after every major version change of the module.