[TikiWiki-commits] [Git][tikiwiki/tiki][cherry-pick-fixadmingroup] [FIX] tiki-admingroups.tpl: prevent rendering of empty group homepage links in...

"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <691e53c155a02_2a3299fc76775@gitlab-sidekiq-low-urgency-cpu-bound-v2-6df8d84988-4bz4q.mail>

Sammy Ndabo pushed to branch cherry-pick-fixadmingroup at Tiki Wiki CMS Groupware / Tiki


Commits:
45f7509b by Sammy Ndabo at 2025-11-20T02:31:39+03:00
[FIX] tiki-admingroups.tpl: prevent rendering of empty group homepage links in...
---
* [FIX] Sefurl.php: ensure non-null source value is provided in handle method

* [ENH] tiki-admingroups.tpl: add message and link to configure Homegroup for undefined group homepage

* [FIX] tiki-admingroups.tpl: prevent rendering of empty group homepage links in admin groups template

See merge request tikiwiki/tiki!9025

(cherry picked from commit 344fe30554b2dcdc0fdbb0117e5820d6fa9e2619)

- - - - -


2 changed files:

- lib/smarty_tiki/Modifier/Sefurl.php
- templates/tiki-admingroups.tpl


Changes:

=====================================
lib/smarty_tiki/Modifier/Sefurl.php
=====================================
@@ -11,6 +11,11 @@ class Sefurl
 {
     public function handle($source, $type = 'wiki', $with_next = '', $all_langs = '', $with_title = 'y', $title = '')
     {
+
+        if ($source === null) {
+            throw new \InvalidArgumentException('sefurl modifier requires a non-null source value.');
+        }
+
         global $prefs;
         $wikilib = \TikiLib::lib('wiki');
         $tikilib = \TikiLib::lib('tiki');


=====================================
templates/tiki-admingroups.tpl
=====================================
@@ -98,7 +98,17 @@
 
                         {if $prefs.useGroupHome eq 'y'}
                             <td class="text">
-                                <a class="link" href="{$users[user].groupHome|sefurl}" title="{tr}Group Homepage{/tr}">{tr}{$users[user].groupHome}{/tr}</a>
+                                {if !empty($users[user].groupHome)}
+                                    <a class="link" href="{$users[user].groupHome|sefurl}" title="{tr}Group Homepage{/tr}">{tr}{$users[user].groupHome}{/tr}</a>
+                                {else}
+                                    <span class="text-muted">
+                                        {tr}Group homepage is not defined{/tr}.
+                                        <a class="btn btn-link p-0 align-baseline"
+                                            href="tiki-admingroups.php?group={$users[user].groupName|escape:"url"}{if $prefs.feature_tabs ne 'y'}#tab2{/if}">
+                                            {tr}Configure{/tr}
+                                        </a>
+                                    </span>
+                                {/if}
                             </td>
                         {/if}
 
@@ -437,8 +447,9 @@
                             <label>{tr}Anniversary{/tr}</label>
                         <input type="text" name="anniversary" class="form-control" value="{if is_array($group_info)}{$group_info.anniversary|escape}{else}{/if}">
                             <div class="form-text">{tr}Use MMDD to specify an annual date as of which all users will be unassigned from the group, or DD to specify a monthly date.{/tr}</div>
-                            <label>{tr}Or{/tr}</label><br> <label>{tr}Number of Days{/tr}</label>
-                        <input type="text" class="form-control" name="expireAfter" value="{if is_array($group_info)}{$group_info.expireAfter|escape}{else}{/if}">
+                            <label>{tr}Or{/tr}</label><br>
+                            <label>{tr}Number of Days{/tr}</label>
+                            <input type="text" class="form-control" name="expireAfter" value="{if is_array($group_info)}{$group_info.expireAfter|escape}{else}{/if}">
                             <div class="form-text">
                                 {tr}Number of days after which all users will be unassigned from the group.{/tr}
                             </div>
@@ -820,7 +831,8 @@
                     <div class="mb-3 row">
                         <label class="col-sm-3 col-form-label">
                             {tr}CSV File{/tr}
-                            <a title="{tr}Help{/tr}" {popup text='user<br>user1<br>user2'}>{icon name='help'}</a> </label>
+                            <a title="{tr}Help{/tr}" {popup text='user<br>user1<br>user2'}>{icon name='help'}</a>
+                        </label>
                         <div class="col-sm-7">
                         <input name="csvlist" type="file" accept=".csv" class="form-control">
                             <div class="form-text">



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

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