[TikiWiki-commits] [Git][tikiwiki/tiki][master] Revert "[FIX] Make modal.tpl header-safe to prevent premature output during AJAX error handling"

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <698a1bf67b7d1_3b184bb077868@gitlab-sidekiq-low-urgency-cpu-bound-v2-5cbd64784f-8t6rw.mail>

Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
a0f03030 by Jonny Bradley at 2026-02-09T17:30:49+00:00
Revert "[FIX] Make modal.tpl header-safe to prevent premature output during AJAX error handling"
---
* Revert "[FIX] Make modal.tpl header-safe to prevent premature output during AJAX error handling"

This reverts commit fd98faafaa8695605f27f8ac772346e2b9ec012b.

See merge request tikiwiki/tiki!9525

- - - - -


2 changed files:

- lib/core/Services/Broker.php
- templates/layouts/internal/modal.tpl


Changes:

=====================================
lib/core/Services/Broker.php
=====================================
@@ -54,7 +54,6 @@ class Services_Broker
                 // Special handling for modal dialog requests
                 // Do not send an error code as bootstrap will just blank out
                 // Render the error as a modal
-                $this->prepareModalHeaderLib();
                 $smarty = TikiLib::lib('smarty');
                 $smarty->assign('title', tr('Oops'));
                 $smarty->assign('detail', ['message' => $e->getMessage()]);
@@ -71,7 +70,6 @@ class Services_Broker
                 // Special handling for modal dialog requests
                 // Do not send an error code as bootstrap will just blank out
                 // Render the error as a modal
-                $this->prepareModalHeaderLib();
                 $smarty = TikiLib::lib('smarty');
                 $smarty->assign('title', tr('Oops'));
                 $smarty->assign('detail', ['message' => $e->getMessage()]);
@@ -206,12 +204,4 @@ class Services_Broker
             return $smarty->fetch($template);
         }
     }
-
-    private function prepareModalHeaderLib()
-    {
-        $headerlib = TikiLib::lib('header');
-        $headerlib->output_js_config();
-        $headerlib->output_js_files();
-        $headerlib->output_js();
-    }
 }


=====================================
templates/layouts/internal/modal.tpl
=====================================
@@ -1,25 +1,23 @@
 <!DOCTYPE html>
 <div class="modal-content-storage">
-    {if !isset($noheader) || $noheader !== 'y'}
+    {if ! isset($noheader) || $noheader !== 'y'}
         <div class="modal-header title">
-            <h4 class="modal-title" id="myModalLabel">
-                {$title|escape}
-                {block name=subtitle}{/block}
-            </h4>
-            <button type="button"
-                    class="btn-close"
-                    data-bs-dismiss="modal"
-                    aria-hidden="true"
-                    aria-label="{tr}Close{/tr}">
-            </button>
+            <h4 class="modal-title" id="myModalLabel">{$title|escape}{block name=subtitle}{/block}</h4>
+            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true" aria-label="{tr}Close{/tr}"></button>
         </div>
     {/if}
-
     <div class="body modal-body">
         {block name=content}{/block}
+        {if $headerlib}
+            {$headerlib->output_js_config()}
+            {$headerlib->output_js_files()}
+            {$headerlib->output_js()}
+        {/if}
+        {if $prefs.feature_debug_console eq 'y' and not empty($smarty.request.show_smarty_debug)}
+            {debug}
+        {/if}
     </div>
 </div>
-
 <div class="modal-footer">
     {block name=buttons}
         <button type="button" class="btn btn-link" data-bs-dismiss="modal">{tr}Close{/tr}</button>



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a0f030304cb1eab8904950b6d9a45c8e673931e2
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.