24 str_contains(
$cmsJs,
'boxSlot === "inline"')
25 && str_contains(
$cmsJs,
'inlineMediaRowsFromEditor(root, rows)'),
26 'The inline media sidebar is not derived from the current editor DOM.'
28foreach (array(
'data-cms-inline-focus',
'data-cms-media-edit-one',
'data-cms-inline-remove') as $attribute) {
29 $assert(str_contains(
$cmsJs, $attribute),
'Inline media action is missing: ' . $attribute);
32 'title: getField(root, "title"),' .
"\n" .
' menu_title: getField(root, "menu_title"),',
33 '"title", "menu_title", "permalink"',
35 $assert(str_contains(
$cmsJs, $needle),
'menu_title is not loaded and saved by the CMS editor.');
38foreach (array(
'' =>
'de',
'_en' =>
'en',
'_es' =>
'es') as $suffix => $language) {
40 $base .
'/dbx/modules/dbxContent_admin/tpl/htm/cms-admin-page-form' . $suffix .
'.htm'
42 $titlePosition = strpos(
$template,
'{obj:title}');
43 $menuTitlePosition = strpos(
$template,
'{obj:menu_title}');
44 $editorPosition = strpos(
$template,
'data-cms-editor');
46 $titlePosition !==
false
47 && $menuTitlePosition !==
false
48 && $menuTitlePosition > $titlePosition
49 && $editorPosition !==
false
50 && $menuTitlePosition < $editorPosition,
51 'menu_title is not part of the page section for ' . $language .
'.'
55 require
$base .
'/dbx/modules/dbxContent_admin/fd/cms-page' . $suffix .
'.fd.php';
58 'editor_image_remove',
61 'media_inline_remove',
62 'media_inline_removed',
64 $assert(trim((
string)(
$messages[$key] ??
'')) !==
'',
'FD message is missing for ' . $language .
': ' . $key);
68foreach (array(
'dbxapp',
'dbxdocs',
'flowers',
'steal') as
$design) {
69 $css = (string)file_get_contents(
$base .
'/dbx/design/' .
$design .
'/css/c-cms.css');
71 str_contains(
$css,
'.dbx-cms-form-grid-page')
72 && str_contains(
$css,
'.is-dbx-cms-selected'),
73 'CMS page layout or inline media focus is missing in design ' .
$design .
'.'
78 fwrite(STDERR,
"FAIL\n- " . implode(
"\n- ",
$failures) .
"\n");