[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Fix debug template rendering when using {select} with limited fields in PluginList

"Joseph Ushindi \(@iRosh243\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <694bc0711652d_2a17fd7c802c3@gitlab-sidekiq-low-urgency-cpu-bound-v2-587dc6b794-hjnvm.mail>

Joseph Ushindi pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
9f9eb177 by Joseph Ushindi at 2025-12-24T10:21:26+00:00
[BP][FIX] Fix debug template rendering when using {select} with limited fields in PluginList
---
* [FIX] Fix debug template rendering when using {select} with limited fields in PluginList
---
* Fix LIST plugin template compatibility when using {select} statement

See merge request tikiwiki/tiki!9112

See merge request tikiwiki/tiki!9198

- - - - -


1 changed file:

- templates/search/list/debug.tpl


Changes:

=====================================
templates/search/list/debug.tpl
=====================================
@@ -1,7 +1,34 @@
 <b>List of returned objects</b>
 <ol>
     {foreach from=$results item=result}
-        <li><a href="{if not empty($result.url)}{$result.url}{else}#{/if}" >{$result.title}</a>
+        <li>
+            {* 1. Use explicit URL from PluginList if available *}
+            {if ! empty($result.url)}
+                <a href="{$result.url|escape}">
+                    {$result.title|escape}
+                </a>
+
+            {* 2. Generate URL based on object type + object id *}
+            {elseif ! empty($result.object_type) && ! empty($result.object_id)}
+                <a href="{sefurl type=$result.object_type objectId=$result.object_id}">
+                    {if ! empty($result.title)}
+                        {$result.title|escape}
+                    {else}
+                        Item #{$result.object_id}
+                    {/if}
+                </a>
+
+            {* 3. Fallback when no URL can be generated *}
+            {else}
+                {if ! empty($result.title)}
+                    {$result.title|escape}
+                {elseif ! empty($result.object_id)}
+                    Item #{$result.object_id}
+                {else}
+                    Unknown Item
+                {/if}
+            {/if}
+        </li>
     {/foreach}
 </ol>
 



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9f9eb17767bfda850c2f52cfd58a414e18e643cb
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.