Display Contacts Manager or select a contact and use batch
The Option No User
is proposed when editing a contact or in the batch modal.
PHP Notice: Undefined variable: noUser in /layouts/joomla/html/batch/user.php on line 26
I tried to modify both in
/administrator/components/com_contact/tmpl/contacts/default_batch_body.php
and
/administrator/components/com_contact/tmpl/contacts/default_batch.php
the line
<?php echo LayoutHelper::render('joomla.html.batch.user', []); ?>
to
<?php echo LayoutHelper::render('joomla.html.batch.user', ['noUser => $noUser]); ?>
without success.
Then I found out that
<?php echo LayoutHelper::render('joomla.html.batch.user', []); ?>
is only used for contacts.
Therefore I modified //layouts/joomla/html/batch/user.php
and commented out $noUser
to
//if ($noUser)
//{
$optionNo = '<option value="0">' . Text::_('JLIB_HTML_BATCH_USER_NOUSER') . '</option>';
//}
?>
<label id="batch-user-lbl" for="batch-user" class="modalTooltip" title="<?php
echo HTMLHelper::_('tooltipText', 'JLIB_HTML_BATCH_USER_LABEL', 'JLIB_HTML_BATCH_USER_LABEL_DESC'); ?>">
<?php echo Text::_('JLIB_HTML_BATCH_USER_LABEL'); ?>
</label>
<select name="batch[user_id]" class="custom-select" id="batch-user-id">
<option value=""><?php echo Text::_('JLIB_HTML_BATCH_USER_NOCHANGE'); ?></option>
<?php echo $optionNo; ?>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('user.userlist'), 'value', 'text'); ?>
</select>
This solves the issue, but this layout could be used by a 3pd who would not want the "No User" option and therefore would need to override the layout.
Any idea what should really be done?
Labels |
Added:
?
|
Status | New | ⇒ | Discussion |
Category | ⇒ | com_contact |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-04-01 07:33:02 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2019-04-01 07:33:02 | ⇒ | 2019-04-01 07:33:03 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Closed as Issue resolved somewhere. @infograf768 please reopen if Issue isn't resolved.
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/23697