[LOW:KNOWN ISSUE:1.0.11] HTML errors in content.html.php

Locked
RaKa
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Nov 02, 2005 11:11 am

[LOW:KNOWN ISSUE:1.0.11] HTML errors in content.html.php

Post by RaKa » Wed Sep 06, 2006 10:52 am

Hi there,

im a big fan and user of joomla, but working on my last website brought me to some curious lines of code in the main output file under "/components/content.html.php". Maybe its an old relict form mambo times, because it can be found in every joomla version. And because its so obviously, i am not sure, if its a bug or a feature  ;)

These lines can be found in the main function "function showContentList" starting from line 28 (V.1.0.11), when it comes to the output of the category description:

Code: Select all

<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>">
  <?php
	if ( $params->get('description') || $params->get('description_image') ) {
	?>
	<tr>
	 <td width="60%" valign="top" class="contentdescription<?php echo $params->get( 'pageclass_sfx' ); ?>" colspan="2">
		<?php
		if ( $params->get('description_image') && $title->image ) {
			$link = $mosConfig_live_site .'/images/stories/'. $title->image;
		?>
		<img src="<?php echo $link;?>" align="<?php echo $title->image_position;?>" hspace="6" alt="<?php echo $title->image;?>" />
		<?php
			}
			if ( $params->get('description') ) {
				echo $title->description;
			}
			?>
	</td>
	</tr>
	<?php
 	          }
	?>
	<tr>
	 <td width="100%">
		<?php
			// Displays the Table of Items in Category View
			if ( $items ) {
				HTML_content::showTable( $params, $items, $gid, $catid, $id, $pageNav, $access, $sectionid, $lists, $order );
			} else if ( $catid ) {
				?>
				<br />
				<?php echo _EMPTY_CATEGORY; ?>
				<br /><br />
				<?php
			}
			// New Content Icon
			if ( ( $access->canEdit || $access->canEditOwn ) && count( $other_categories ) > 0 ) {
				$link = sefRelToAbs( 'index.php?option=com_content&task=new&sectionid='. $id .'&Itemid='. $Itemid );
				?>
				<a href="<?php echo $link; ?>">
					<img src="<?php echo $mosConfig_live_site;?>/images/M_images/new.png" width="13" height="14" align="middle" border="0" alt="<?php echo _CMN_NEW;?>" />
						 <?php echo _CMN_NEW;?>...</a>
				<br /><br />
				<?php
			}
			?>				
			</td>
		</tr>
		<tr>
			<td colspan="2">
			<?php
			// Displays listing of Categories
			if ( ( ( count( $other_categories ) > 1 ) || ( count( $other_categories ) < 2 && count( $items ) < 1 ) ) ) {
				if ( ( $params->get( 'type' ) == 'category' ) && $params->get( 'other_cat' ) ) {
					HTML_content::showCategories( $params, $items, $gid, $other_categories, $catid, $id, $Itemid );
				}
				if ( ( $params->get( 'type' ) == 'section' ) && $params->get( 'other_cat_section' ) ) {
					HTML_content::showCategories( $params, $items, $gid, $other_categories, $catid, $id, $Itemid );
				}
			}
			?>
		</td>
	</tr>
</table>

In the first part/table row the content descritpion is displayed, but why with a table width of 60% and a colspan=2? Wouldnt´t it be better to do the width via the assigned classes?

In the second part/next table row the items are displayed but now without "colspan=2" and "width=100%". So the table syntax is wrong when there are no item. Furthermore, wouldn´t it be better to put the if block around the whole table row, so if you deselect "Display Items in cat view" in your menu button parameters, now empty table row would be created, as is it done now.

In the third part/ next table row the "colspan=2" reappears without any width and here the same, it would make sense to put the if block (Display listing of categories) around the whole table row, because if the listing of cat items is deselected in the menu parameters it leads to an empty table row.

Hopefully you can correct this simple issues, or is there anything i misunderstood? ;)

Thanks
  Ralph
Last edited by Anonymous on Mon Nov 20, 2006 8:02 am, edited 1 time in total.

user deleted

Re: HTML errors in content.html.php

Post by user deleted » Fri Sep 08, 2006 11:45 am

[TAGGED: Q&T] Status > Under review, Classification > LOW


user deleted

Re: [LOW:UNDER REVIEW:1.0.11] HTML errors in content.html.php

Post by user deleted » Mon Nov 20, 2006 8:01 am

Q&T Note; no response, this will also not be fixed due to backwards compatibility reasons. Closing as Known Issue and moving to corresponding forum.


Locked

Return to “Known Issues - Archive”