Skip to content

EZP-26680 INI Cache files are generated with wrong filepaths#1269

Open
wawrzynkiewicz wants to merge 1 commit intoezsystems:masterfrom
wawrzynkiewicz:patch-2
Open

EZP-26680 INI Cache files are generated with wrong filepaths#1269
wawrzynkiewicz wants to merge 1 commit intoezsystems:masterfrom
wawrzynkiewicz:patch-2

Conversation

@wawrzynkiewicz
Copy link

When publicAPI calls are executed via Symfony controller and for example a user is created via UserService, this Signal is triggered into legacy System cache management.

The eZINI::instance() is called inside user datatype which checks site.ini cache file. In the cache file are relative paths to override ini files which do not work because application is in Symfony context (and not cwd in legacy).

The override file is not found via file_exists() and the new generated cachefile is w/o override files cached, which "destroys" legacy application.

When publicAPI calls are executed via Symfony controller and for example a user is created via UserService, this Signal is triggered into legacy System cache management.

The eZINI::instance() is called inside user datatype which checks site.ini cache file. In the cache file are relative paths to override ini files which do not work because application is in Symfony context (and not cwd in legacy).

The override file is not found via file_exists() and the new generated cachefile is w/o override files cached, which "destroys" legacy application.
@andrerom
Copy link
Contributor

-1 Might be missing legacy fallback call which would make sure folder is right for legacy?

@gggeek
Copy link
Contributor

gggeek commented Nov 25, 2016

I was thinking along the same lines...

@wawrzynkiewicz
Copy link
Author

wawrzynkiewicz commented Nov 25, 2016

The requested ini file is always stored absolute, the additional one's relative. So there is a inconsistency on this...

<?php
// This is a auto generated ini cache file, time created:Fri, 25 Nov 16 12:23:32 +0100
$data = array(
'rev' => 2,
'created' => '2016-11-25T12:23:32+01:00',
'charset' => "utf-8",
'files' => array (0 => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',1 => 'settings/override/site.ini.append.php',
),
'file' => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',
'val' => array...

@joaoinacio
Copy link

IIUC,eZDir::path() should return an absolute path derived from [$rootDir, $overrideDir, $fileName].
If that is not the case, the issue could be elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants