View Issue Details

IDProjectCategoryView StatusLast Update
0007982OXID eShop (all versions)4. ------ eShop Core -------public2026-07-29 15:04
Reportermichael_keiluweit Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version7.5.1 
Summary0007982: oe:license:add silently stores nothing on an offline (grace-expired / unlicensed) shop
DescriptionA shop whose license grace period has expired serves the maintenance/offline page (HTTP 500) and considers itself unlicensed. Attempting to recover it with oe:license:add <valid-serial> appears to succeed but stores nothing:

- The command prints only Adding new license, exits 0, and prints no status line and no error.
- Reading the database directly shows aSerials remains a:0:{} (empty) before and after the command.

Root cause: the shop-validity/offline check runs during config load, triggered by the very first getConfigParam() call. When the license is invalid, this check terminates the process with a clean exit() (no PHP error). oe:license:add internally reads config (validate() then getSerialList() then getConfigParam('aSerials')) as its first config access, so it is killed before it reaches the code that persists the serial. The shop therefore cannot license itself via the console once it has gone offline.
Steps To Reproduce1. Provision a shop without a valid license and let it reach the offline state (fresh EE install, no serial, older than the 7-day grace period). The frontend then serves the maintenance page with HTTP 500.
2. Confirm the shop is unlicensed, reading the DB directly (not via the framework): SELECT oxvarvalue FROM oxconfig WHERE oxvarname='aSerials'; -- => a:0:{}
3. Run the add command with a valid serial: vendor/bin/oe-console oe:license:add <VALID-SERIAL>
4. Observe the output is only: Adding new license
   (exit code 0, no status line, no error).
5. Re-check the DB directly: SELECT oxvarvalue FROM oxconfig WHERE oxvarname='aSerials'; -- STILL a:0:{}
6. Confirm the config-load exit with an instrumented CLI script:
<?php
require '/var/www/source/bootstrap.php';
$m = 'M0';
register_shutdown_function(fn() => fwrite(STDERR, "[SHUTDOWN] last_marker=$m last_error=".json_encode(error_get_last())."\n"));
$cfg = \OxidEsales\Eshop\Core\Registry::getConfig();
$m = 'M1-got-config'; fwrite(STDOUT, "$m\n");
$x = $cfg->getConfigParam('sTheme');           // first config read, any var
$m = 'M2-getConfigParam-OK'; fwrite(STDOUT, "$m\n");

   Output:
M1-got-config
[SHUTDOWN] last_marker=M1-got-config last_error=null
The process exits inside the first getConfigParam() (M2 is never reached), cleanly, with no PHP error.
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

There are no notes attached to this issue.