Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ All notable changes to **Tiger Core** (`webtigers/tiger-core`). Format follows

## [Unreleased]

## [1.18.1] — 2026-09-27

### Fixed

- **CMS home-page picker (TigerPathbox) now shows the full list on open, including the active theme.**
On focus the control was sending its current label ("— Built-in landing page —") as the search query,
so opening it filtered every other option out — an active theme's home never appeared. It now searches
with an empty query while the box still shows the committed label (full list), filters only once you
type, and selects the text on focus so typing replaces it. The discovery service was already correct.
- **CMS Settings: the "Advanced search" toggle sits beside the home-page combobox** (its help text moved
to a tooltip) for a tidier row.

## [1.18.0] — 2026-09-26

### Changed
Expand Down
2 changes: 1 addition & 1 deletion library/Tiger/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
class Tiger_Version
{
/** Current Tiger Core version. Keep in lockstep with the git tag cut for a release. */
const VERSION = '1.18.0';
const VERSION = '1.18.1';
}
30 changes: 16 additions & 14 deletions modules/cms/views/scripts/settings/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,22 @@ $el = function ($name) use ($form) { return $form->getElement($name); };
<?php // The committed value the form submits — hidden; the combobox writes into it. ?>
<div class="d-none"><?= $el('home_page') ?></div>

<?php // The searchable "pick or type" control (TigerPathbox → Cms_Service_Paths). ?>
<div data-tg-pathbox data-service="cms/paths/search"
data-value-field="set-home-page" data-advanced-field="set-home-advanced">
<input type="text" class="form-control" id="set-home-page-search" data-tg-pathbox-search
autocomplete="off" role="combobox" aria-expanded="false" aria-autocomplete="list"
value="<?= $this->escape($this->homeLabel) ?>"
placeholder="<?= $this->escape($this->t('cms.settings.home_placeholder')) ?>"
data-empty-text="<?= $this->escape($this->t('cms.settings.home_empty')) ?>">
</div>

<div class="form-check mt-2">
<input class="form-check-input" type="checkbox" id="set-home-advanced">
<label class="form-check-label" for="set-home-advanced"><?= $this->t('cms.settings.advanced_search') ?></label>
<div class="form-text mt-0"><?= $this->t('cms.settings.advanced_search_help') ?></div>
<?php // The searchable "pick or type" control (TigerPathbox → Cms_Service_Paths),
// with the Advanced-search toggle BESIDE it. ?>
<div class="d-flex align-items-center gap-3">
<div class="flex-grow-1" data-tg-pathbox data-service="cms/paths/search"
data-value-field="set-home-page" data-advanced-field="set-home-advanced">
<input type="text" class="form-control" id="set-home-page-search" data-tg-pathbox-search
autocomplete="off" role="combobox" aria-expanded="false" aria-autocomplete="list"
value="<?= $this->escape($this->homeLabel) ?>"
placeholder="<?= $this->escape($this->t('cms.settings.home_placeholder')) ?>"
data-empty-text="<?= $this->escape($this->t('cms.settings.home_empty')) ?>">
</div>
<div class="form-check mb-0 text-nowrap">
<input class="form-check-input" type="checkbox" id="set-home-advanced">
<label class="form-check-label" for="set-home-advanced"
title="<?= $this->escape($this->t('cms.settings.advanced_search_help')) ?>"><?= $this->t('cms.settings.advanced_search') ?></label>
</div>
</div>

<div class="form-text"><?= $this->t('cms.settings.help_home_page', '<code>/</code>') ?></div>
Expand Down
8 changes: 6 additions & 2 deletions themes/puma/assets/js/tiger.pathbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@
open = true; // a fetch expresses open intent (focus/typing/toggle)
var body = new URLSearchParams();
body.set('module', service[0]); body.set('service', service[1]); body.set('method', service[2]);
body.set('q', search.value.trim());
// While the box still shows the COMMITTED label (just focused, not yet edited), search with an
// EMPTY q so the FULL list appears — otherwise opening the control would "search" for the
// current selection's label and hide every other option (the active theme included).
var typed = search.value.trim();
body.set('q', typed === (picked.label || '').trim() ? '' : typed);
body.set('advanced', advEl && advEl.checked ? '1' : '0');
fetch('/api', { method: 'POST', headers: { 'X-Requested-With': 'XMLHttpRequest' }, body: body })
.then(function (r) { return r.json().catch(function () { return {}; }); })
Expand All @@ -132,7 +136,7 @@
options[activeIdx].scrollIntoView({ block: 'nearest' });
}

search.addEventListener('focus', fetchOptions);
search.addEventListener('focus', function () { search.select(); fetchOptions(); });
search.addEventListener('input', schedule);
if (advEl) { advEl.addEventListener('change', fetchOptions); }

Expand Down
Loading