?
avatar C-Lodder
C-Lodder
23 Feb 2017

In HTML, direct children of the <ul> tag must be <li> and nothing else

In mod_whosonline, there's appears to be a <p> tag inside the <ul>

https://github.com/joomla/joomla-cms/blob/staging/modules/mod_whosonline/tmpl/default.php#L22

The markup should either be:

<ul>
   <li><p>some text</p></li>
   <li>user 1</li>
   <li>user 2</li>
</ul>

or:

<p>some text</p>
<ul>
   <li>user 1</li>
   <li>user 2</li>
</ul>

System information (as much as possible)

  • Joomla staging
avatar C-Lodder C-Lodder - open - 23 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 23 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Feb 2017
avatar photodude
photodude - comment - 24 Feb 2017

looking at the code I think the second option is the correct fix as follows

<?php if (($showmode > 0) && count($names)) : ?>
	<?php if ($params->get('filter_groups')) : ?>
		<p><?php echo JText::_('MOD_WHOSONLINE_SAME_GROUP_MESSAGE'); ?></p>
	<?php endif; ?>
	<ul  class="whosonline<?php echo $moduleclass_sfx; ?>" >
	<?php foreach ($names as $name) : ?>
		<li>
			<?php echo $name->username; ?>
		</li>
	<?php endforeach; ?>
	</ul>
<?php endif;

including the <p> tag in the <li> would result in the message possibly having a bullet which would be incorect for this use case.

avatar brianteeman
brianteeman - comment - 10 Mar 2017

see 14454 for a PR

avatar zero-24 zero-24 - change - 10 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-10 11:11:35
Closed_By zero-24
avatar zero-24 zero-24 - close - 10 Mar 2017

Add a Comment

Login with GitHub to post a comment