J2.5

Difference between revisions of "Joomla 2.5 com content generates non-valid xhtml"

From Joomla! Documentation

(3 intermediate revisions by 2 users not shown)
Line 33: Line 33:
 
*<nowiki>+ means line added</nowiki>
 
*<nowiki>+ means line added</nowiki>
 
*<nowiki>- means line removed</nowiki>
 
*<nowiki>- means line removed</nowiki>
== See also ==  
+
===See also===  
* [http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27870 issue in the tracker] (bug tracker #27870)
+
* [http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27870 See issue in the tracker] (bug tracker #27870)
  
[[Category:Version 2.5 FAQ]]
+
<noinclude>[[Category:Version 2.5.0 FAQ]]
 
[[Category:Version 2.5.1 FAQ]]
 
[[Category:Version 2.5.1 FAQ]]
 
[[Category:Version 2.5.2 FAQ]]
 
[[Category:Version 2.5.2 FAQ]]
[[Category:Version 2.5.3 FAQ]]
+
[[Category:Version 2.5.3 FAQ]]</noinclude>

Revision as of 09:19, 11 February 2013

The "J2.5" namespace is a namespace scheduled to be archived. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 2.5 content component generates non-valid xhtml if an article has empty parameters: Link A, Link B, Link C.

The problem is located in this file: components\com_content\views\article\tmpl\default_links.php

For fixing the issue apply the next patch:

Index: components/com_content/views/article/tmpl/default_links.php
===================================================================
--- components/com_content/views/article/tmpl/default_links.php	(revision 22800)
+++ components/com_content/views/article/tmpl/default_links.php	(working copy)
@@ -12,11 +12,11 @@
 
 // Create shortcuts to some parameters.
 $params		= $this->item->params;
+if ($urls AND (!empty($urls->urla) OR !empty($urls->urlb) OR !empty($urls->urlc))) :
 ?>
 <div class="content-links">
 	<ul>
 		<?php
-		if ($urls) :
 			$urlarray = array(
 			array($urls->urla, $urls->urlatext, $urls->targeta, 'a'),
 			array($urls->urlb, $urls->urlbtext, $urls->targetb, 'b'),
@@ -73,5 +73,5 @@
 				</li>
 		<?php endforeach; ?>
 	</ul>
-	<?php endif; ?>
 </div>
+<?php endif; ?>
  • + means line added
  • - means line removed

See also[edit]