Fix the blank page on a client page opened without a client in the address, such as an old bookmark to the client overview: it now says That client isn't here in the normal agent layout with a way back to Clients, as it also does for a deleted client instead of the bare Nothing to see here page; remove the old Access Modules page, already hidden from the Admin menu, and its commented-out menu entry; the white-labelling turned off notice now links to Settings, Modules; 26.12.3 changelog entries

This commit is contained in:
johnnyq
2026-11-29 23:03:52 -05:00
parent 8479010c18
commit 024220e94d
5 changed files with 32 additions and 107 deletions

View File

@@ -43,6 +43,9 @@ Update from Maintenance > Update as usual - this release has four database chang
- Documents created or edited through the API no longer get extra backslashes added before quotes and line breaks, and changing only a document's name through the API no longer changes what it says.
- Deleting a client deletes its tickets' attachments and pictures, files and all, and their tasks, watchers and history, instead of leaving them behind.
- Pictures saved as WebP show in a client's documentation PDF and a document's PDF instead of being left out.
- A client page opened without a client in its address, such as an old bookmark to a client's overview, was a blank page. It now says That client isn't here, as it does for a client that's been deleted, with the menu and a way back to Clients.
- The notice that white-labelling was turned off opens Admin > Settings > Modules, instead of a page that isn't there.
- The old Access Modules page, already off the Admin menu, is gone. What each role can do is set on the role, in Admin > Roles.
### Developer Updates
@@ -73,6 +76,7 @@ Update from Maintenance > Update as usual - this release has four database chang
- Admin: admin/identity_providers.php (list), admin/modals/identity_provider/identity_provider_edit.php (Add and Edit), admin/post/identity_provider.php (save_identity_provider, turn_identity_provider_on / off, delete_identity_provider - locked in the demo). The identity settings page and edit_identity_provider are gone. portalSignInMethods() and identityProviderContactsWording() take an email, to offer only the providers that sign it in; vaultLockedReason() says why the vault is locked.
- functions/print_sheet.php draws the work order (ticketWorkOrderHtml()) and spec sheet (assetSpecSheetHtml()) into their pages, hidden on screen; css .itflow-print-sheet hides the rest of the page when printing (the .container-fluid:has() rule). [data-print-page] buttons call window.print() (js/app.js). The ticket's actions bar and menu now show for every agent.
- includes/document_editors.php is a document's two editors and the switch between them, shared by agent/modals/document/document_form.php and client/document_add.php (which now posts format, content and markdown, saved through documentPostedContent()). js/document_markdown.js converts at the address its script tag gives (data-markdown-url, client/post.php markdown_to_html and html_to_markdown in the portal). itflowProseContentStyle() moved to js/tinymce_defaults.js; js/portal.js sets up .tinymce-document, and its required check looks in the Markdown box when that is shown.
- agent/includes/inc_all_client.php: without a client_id, or with one that isn't there, it draws That client isn't here in the agent layout and exits, before anything queries with no client - it was an SQL error (or a tagPills() TypeError) and a blank page. admin/modules.php and its commented-out menu entry are removed.
## [26.12.2]

View File

@@ -39,14 +39,6 @@
<p>Roles</p>
</a>
</li>
<!-- 2025-12-05 JQ - Hide Permission Modules currently just shows modules
<li class="nav-item">
<a href="/admin/modules.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "modules.php") {echo "active";} ?>">
<i class="nav-icon fas fa-puzzle-piece"></i>
<p>Modules</p>
</a>
</li>
-->
<li class="nav-item">
<a href="/admin/api_keys.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "api_keys.php") {echo "active";} ?>">
<i class="nav-icon fas fa-key"></i>

View File

@@ -1,92 +0,0 @@
<?php
// Default Column Sortby Filter
$sort = "module_name";
$order = "DESC";
require_once "includes/inc_all_admin.php";
// Only a column the list has - another was an SQL error that stopped the page
if (!in_array($sort, ['module_name', 'module_description'], true)) {
$sort = 'module_name';
}
$sql = mysqli_query(
$mysqli,
"SELECT SQL_CALC_FOUND_ROWS module_description, module_id, module_name FROM modules
WHERE (module_name LIKE '%$q%' OR module_description LIKE '%$q%')
ORDER BY $sort $order LIMIT $record_from, $record_to"
);
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<div class="card">
<div class="card-header bg-dark py-2">
<h3 class="card-title mt-2"><i class="fas fa-fw fa-puzzle-piece me-2"></i>Access Modules</h3>
<?php // No New Module, Edit or Delete: modules are built in - there is no form or handler to add or change one ?>
</div>
<div class="card-header py-3">
<form autocomplete="off">
<div class="row g-2 align-items-center">
<div class="col-md-4">
<div class="input-group">
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) {echo stripslashes(escapeHtml($q));} ?>" placeholder="Search modules...">
<button class="btn btn-primary" title="Search"><i class="fas fa-search"></i></button>
</div>
</div>
</div>
</form>
</div>
<div class="table-responsive-sm">
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th class="ps-3">
<?= sortLink('module_name', 'Module') ?>
</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_assoc($sql)) {
$module_id = intval($row['module_id']);
$module_name = escapeHtml($row['module_name']);
$module_description = escapeHtml($row['module_description']);
?>
<tr>
<td class="ps-3">
<strong class="text-dark"><?= $module_name ?></strong>
<div class="text-secondary"><?= $module_description ?></div>
</td>
<td>
<p class='text-center'>N/A Predefined</p>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
$empty_state = [
'thing' => 'modules',
'icon' => 'fa-puzzle-piece',
];
?>
<?php require_once "../includes/filter_footer.php";
?>
</div>
<?php
require_once "../includes/footer.php";

View File

@@ -8,8 +8,12 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/page_title.php';
// Perms
enforceUserPermission('module_client');
if (isset($_GET['client_id'])) {
$client_id = intval($_GET['client_id']);
// The client the page is for. Without one in the address - an old bookmark to a client page - or
// with one that isn't there, the page says so below, instead of failing on an SQL error.
$client_id = intval($_GET['client_id'] ?? 0);
$client_not_here = $client_id <= 0;
if ($client_id > 0) {
// Client Access Check
enforceClientAccess();
@@ -31,10 +35,7 @@ if (isset($_GET['client_id'])) {
);
if (mysqli_num_rows($sql) == 0) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1><a class='btn btn-lg btn-secondary mt-3' href='javascript:history.back()'><i class='fas fa-fw fa-arrow-left'></i> Go Back</a></center>";
exit;
$client_not_here = true;
} else {
$row = mysqli_fetch_assoc($sql);
@@ -285,6 +286,26 @@ if (isset($_GET['client_id'])) {
}
}
// No client - the app's own page, with the agent menu, saying so (as billingNotFound() does for an invoice)
if ($client_not_here) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/top_nav.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/agent/includes/get_side_nav_counts.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/agent/includes/side_nav.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/inc_wrapper.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/inc_alert_feedback.php';
?>
<div class="itflow-asset-empty mt-5" data-client-not-here>
<i class="fas fa-building fa-3x mb-3 opacity-50"></i>
<h1 class="h4">That client isn't here</h1>
<p><?= $client_id > 0 ? 'It may have been deleted, or the address is wrong.' : 'The address doesn\'t say which client - it may be from an old bookmark.' ?></p>
<a class="btn btn-outline-secondary" href="/agent/clients.php"><i class="fas fa-arrow-left me-2"></i>Back to Clients</a>
</div>
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php';
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/top_nav.php';
require_once 'includes/client_side_nav.php';

View File

@@ -239,7 +239,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
// Whitelabel - Disable if expired/invalid
if ($config_whitelabel_enabled && !validateWhitelabelKey($config_whitelabel_key)) {
mysqli_query($mysqli, "UPDATE settings SET config_whitelabel_enabled = 0, config_whitelabel_key = '' WHERE company_id = 1");
appNotify("Settings", "White-labelling was disabled due to expired/invalid key", "/admin/settings_modules.php");
appNotify("Settings", "White-labelling was disabled due to expired/invalid key", "/admin/settings_module.php");
}