[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [BP][FIX] UAB: several admin pages seem to fell off from the admin layout +...

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]> Tue, 14 Jul 2026 15:42:17 +0000
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a5658d9ba904_3819c1201001cd@gitlab-sidekiq-low-urgency-cpu-bound-v2-85d5db4876-cldkr.mail>

Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
8a763991 by luci at 2026-07-14T15:34:48+00:00
[BP][FIX] UAB: several admin pages seem to fell off from the admin layout + fix the layout when theme_unified_admin_backend pref is disabled
---
* [FIX] UAB: several admin pages seem to fell off from the admin layout + fix the layout when theme_unified_admin_backend pref is disabled
---
* [FIX] SmartMenus: correct loading order when theme_admin is set and UAB is disabled (thanks @jonnybradley)

* [FIX] Control panels: top_modules navbar was transparent when UAB (theme_unified_admin_backend) is disabled

* [FIX] UAB: tiki-objectpermissions belongs under admin layout next to users and groups admin pages too so bring it back

* [FIX] UAB: fix the layout when UAB is disabled

* [FIX] UAB: fix the layout when UAB is disabled

* [FIX] UAB: fix the layout when UAB is disabled

* [FIX] UAB: Permissions admin page seem to fell off from the admin layout + attempt to fix the layout when UAB is disabled

* [FIX] UAB: Permissions admin page seem to fell off from the admin layout + attempt to fix the layout when UAB is disabled

* [FIX] UAB: several pages from the Manage - Admin Tools section seem to fell off from the admin layout
+ one little fix for the layout of tiki-admin.php control panels when UAB is disabled
or the legacy control panel icons dashboard is requested

See merge request tikiwiki/tiki!10622

(cherry picked from commit 5ce87e3a)

Conflicts resolved manually:
-       tiki-admin.php
-       tiki-check.php (includes part of !9621, specifically changes on lines 69-88, see https://gitlab.com/tikiwiki/tiki/-/commit/1ffa98053d969a39d5e1b0d700ee03b150f5fa25?file_path=tiki-check.php#line_3ca684d70_A69)
-       tiki-markdown_import.php (removed as it is not in 30.x)

See merge request tikiwiki/tiki!10719

- - - - -


11 changed files:

- lib/core/Sections.php
- themes/base_files/scss/_tiki-pagetop_colors.scss
- tiki-admin.php
- tiki-check.php
- tiki-importer.php
- tiki-objectpermissions.php
- tiki-performance_stats.php
- tiki-referer_stats.php
- tiki-search_stats.php
- tiki-setup.php
- tiki-syslog.php


Changes:

=====================================
lib/core/Sections.php
=====================================
@@ -267,10 +267,19 @@ class Sections
 
     public static function setCurrentSection(string $section): void
     {
+        global $prefs;
+
         if (! in_array($section, self::getAllSections(), true)) {
             throw new \InvalidArgumentException("Invalid section: $section");
         }
 
+        if ($prefs['theme_unified_admin_backend'] !== 'y' && $section === self::SECTION_ADMIN_LAYOUT) {
+            // Trigger SECTION_ADMIN instead of SECTION_ADMIN_LAYOUT when UAB is disabled
+            $section = self::SECTION_ADMIN;
+            self::$currentSection = $section;
+            self::triggerSectionChangeCallbacks($section);
+        }
+
         if (self::$currentSection !== $section) {
             // Trigger callbacks when section changes
             self::$currentSection = $section;


=====================================
themes/base_files/scss/_tiki-pagetop_colors.scss
=====================================
@@ -8,8 +8,8 @@
 // Themes using this file should define the variables used in this file as described on https://themes.tiki.org/CSS Variables in Tiki
 
 // Top module zone and parent divs
-body:not(.tiki-admin) .tiki-top-nav-light,
-body:not(.tiki-admin) .tiki-top-nav-dark
+body:not(.tiki-admin.layout_admin) .tiki-top-nav-light,
+body:not(.tiki-admin.layout_admin) .tiki-top-nav-dark
 {
     background: var(--tiki-top-bg) !important; // !important added to deal with Smartmenus undefined background
     color: var(--tiki-top-text-color); // Turns out it's necessary to provide a variable for this. Previously written: The idea for this was text, etc. that isn't a link, but probably anything in these nav zones that isn't a link will have its own CSS rules already.
@@ -31,8 +31,8 @@ body:not(.tiki-admin) .tiki-top-nav-dark
 }
 
 // Shadow is only appropriate on header.sticky-top, to indicate header overlies page content
-body.layout_social:not(.tiki-admin) .tiki-top-nav-light,
-body.layout_social:not(.tiki-admin) .tiki-top-nav-dark
+body.layout_social:not(.tiki-admin.uab) .tiki-top-nav-light,
+body.layout_social:not(.tiki-admin.uab) .tiki-top-nav-dark
 {
     box-shadow: var(--tiki-top-box-shadow);
 }
@@ -68,7 +68,7 @@ body.layout_social:not(.tiki-admin) .tiki-top-nav-dark
 
 
 // Apply background: transparent to children of uppermost parent to prevent nested gradients and possible interference with box-shadow on page header
-.tiki.layout_basic:not(.tiki-admin) {
+.tiki.layout_basic:not(.tiki-admin.uab) {
     .top_modules, // In template, page-header was changed to site-header, so changing here now
     .top_modules .navbar,
     .topbar_modules .navbar {
@@ -79,7 +79,7 @@ body.layout_social:not(.tiki-admin) .tiki-top-nav-dark
     }
 }
 
-.tiki.layout_classic:not(.tiki-admin) {
+.tiki.layout_classic:not(.tiki-admin.uab) {
     .top_modules .navbar,
     .topbar,
     .topbar_modules,
@@ -91,7 +91,7 @@ body.layout_social:not(.tiki-admin) .tiki-top-nav-dark
     }
 }
 
-.layout_social:not(.tiki-admin) {
+.layout_social:not(.tiki-admin.uab) {
     .top_modules,
     .top_modules .navbar,
     .topbar,


=====================================
tiki-admin.php
=====================================
@@ -15,7 +15,12 @@ use Tiki\Package\ComposerCli;
 use Tiki\Package\ExtensionManager;
 use Tiki\Suggestion\Rules;
 use Tiki\Sections;
-$section = Sections::SECTION_ADMIN_LAYOUT;
+
+if (! isset($_REQUEST['admin_dashboard_icons']) && $prefs['theme_unified_admin_backend'] !== 'n') {
+    $section = Sections::SECTION_ADMIN_LAYOUT;
+} else {
+    $section = Sections::SECTION_ADMIN;
+}
 Sections::setCurrentSection($section);
 
 $adminlib = TikiLib::lib('admin');


=====================================
tiki-check.php
=====================================
@@ -31,6 +31,7 @@ use Tiki\Lib\Unoconv\UnoconvStrategy;
 use Tiki\Lib\Unoconv\UnoserverStrategy;
 use Tiki\Package\ComposerManager;
 use Smarty\Smarty;
+use Tiki\Sections;
 
 // Define fitness status constants early
 define('FITNESS_STATUS_GOOD', 'good');
@@ -65,6 +66,30 @@ if (isset($_REQUEST['tiki-check-ping'])) {
     die('pong:' . (int)$_REQUEST['tiki-check-ping']);
 }
 
+$standalone = ! file_exists('./templates/tiki-check.tpl');
+
+if ($standalone) {
+    function tra(string $content, ...$params): string
+    {
+        foreach ($params as $data) {
+            if (is_array($data) && count($data) > 0) {
+                foreach ($data as $index => $value) {
+                    $content = str_replace("%$index", $value, $content);
+                }
+            }
+        }
+        return $content;
+    }
+    function tr(string $content): string
+    {
+        $args = func_get_args();
+        return tra($content, array_slice($args, 1));
+    }
+} else {
+    require_once('tiki-setup.php');
+    $section = Sections::SECTION_ADMIN_LAYOUT;
+    Sections::setCurrentSection($section);
+}
 // AJAX dashboard refresh
 if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] === 'dashboard') {
     // Set up standalone mode for AJAX


=====================================
tiki-importer.php
=====================================
@@ -22,6 +22,9 @@ $inputConfiguration = [
 ];
 require_once('tiki-setup.php');
 require_once('lib/wiki/editlib.php');
+use Tiki\Sections;
+$section = Sections::SECTION_ADMIN_LAYOUT;
+Sections::setCurrentSection($section);
 
 $access->check_permission('tiki_p_admin_importer');
 


=====================================
tiki-objectpermissions.php
=====================================
@@ -42,6 +42,10 @@ $inputConfiguration = [
 ];
 
 include_once('tiki-setup.php');
+use Tiki\Sections;
+$section = Sections::SECTION_ADMIN_LAYOUT;
+Sections::setCurrentSection($section);
+
 if (! empty($_REQUEST['objectType']) && $_REQUEST['objectType'] != 'global') {
     if (! isset($_REQUEST['objectName']) || empty($_REQUEST['objectId'])) {
         Feedback::errorAndDie(tra('Not enough information to display this page'), \Laminas\Http\Response::STATUS_CODE_409);


=====================================
tiki-performance_stats.php
=====================================
@@ -20,6 +20,10 @@ $inputConfiguration = [
 require_once('tiki-setup.php');
 $performanceLib = TikiLib::lib('performancestats');
 
+use Tiki\Sections;
+$section = Sections::SECTION_ADMIN_LAYOUT;
+Sections::setCurrentSection($section);
+
 $access->check_feature('tiki_monitor_performance');
 $access->check_permission('tiki_p_admin');
 


=====================================
tiki-referer_stats.php
=====================================
@@ -21,6 +21,10 @@ $inputConfiguration = [
 
 require_once('tiki-setup.php');
 include_once('lib/refererstats/refererlib.php');
+use Tiki\Sections;
+$section = Sections::SECTION_ADMIN_LAYOUT;
+Sections::setCurrentSection($section);
+
 $access->check_feature('feature_referer_stats');
 $access->check_permission('tiki_p_view_referer_stats');
 


=====================================
tiki-search_stats.php
=====================================
@@ -18,6 +18,10 @@ require_once('tiki-setup.php');
 $searchstatslib = TikiLib::lib('searchstats');
 //get_strings tra('Search Stats')
 
+use Tiki\Sections;
+$section = Sections::SECTION_ADMIN_LAYOUT;
+Sections::setCurrentSection($section);
+
 $access->check_feature('feature_search_stats');
 $access->check_permission('tiki_p_admin');
 


=====================================
tiki-setup.php
=====================================
@@ -696,7 +696,7 @@ if ($prefs['jquery_fitvidjs'] == 'y') {
 }
 if ($prefs['jquery_smartmenus_enable'] == 'y') {
     Sections::onSectionChange(function ($section) use ($headerlib) {
-        $headerlib->add_cssfile(NODE_PUBLIC_DIST_PATH . '/smartmenus/dist/css/smartmenus-only-layout.css');
+        $headerlib->add_cssfile(NODE_PUBLIC_DIST_PATH . '/smartmenus/dist/css/smartmenus-only-layout.css', 10);
         $headerlib->add_js_module(
             'import SmartMenus from "smartmenus";
 const nav = document.querySelectorAll("nav");


=====================================
tiki-syslog.php
=====================================
@@ -24,6 +24,10 @@ $inputConfiguration = [
 ];
 require_once('tiki-setup.php');
 
+use Tiki\Sections;
+$section = Sections::SECTION_ADMIN_LAYOUT;
+Sections::setCurrentSection($section);
+
 $access->check_permission('tiki_p_admin');
 
 $auto_query_args = ['offset', 'numrows', 'maxRecords', 'find', 'sort_mode'];



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8a7639910d5d1e116c72825339cfed8cd1ecdb66

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8a7639910d5d1e116c72825339cfed8cd1ecdb66
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs