Messy to describe, but here goes....

I have a constants file in catalog extra_definitions which contains an array list of constant names, and the corresponding constant definitions.
eg:

PHP Code:
descr_stringlist = ["ATEQ_TPMS_UPDATE""ATEQ_TPMS_COMPANY"
(with 300+ constant names).

Product descriptions use these constant names and when a product is viewed, the description is parsed and these constant names are replaced by their text definitions: they are used for boilerplate functionality.
The parsing is done by a function in catalog.
This is working in shopfront.

In admin, when trying to display the parsed/replaced description in product preview, I have an error as the array of the constants "does not exist".
The catalog constants file is included in the admin by a file in

admin1\includes\languages\english\extra_definitions\boilerplate_text_pointer.php

It is correctly found and included, as a constant used from the same file can be used, but the array defined in that file "does not exist".
It's as though the array is being unset/not allowed/sanitised??

It works in ZC156.

This chunk from ZC156 is missing from init_languages in ZC157:
if ($za_dir = @dir(DIR_WS_LANGUAGES . $_SESSION['language'] . '/extra_definitions')) {
while ($zv_file = $za_dir->read()) {
if (preg_match('~^[^\._].*\.php$~i', $zv_file) > 0) {
require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/extra_definitions/' . $zv_file);
}
}
$za_dir->close();
}
But since the catalog file IS being loaded via /extra_definitions, I assume this functionality is implemented elsewhere and I presume where the array is being unset...but I don't see where.