?
avatar sraberus
sraberus
30 Nov 2017

Steps to reproduce the issue

Hi, I found "bug" that is doing one blank space character on header and dates in Joomla! 3.8.2. So you are not able to center headers properly, because of that blank space character on the end. Picture below

for example: com_content/views/featured/tmpl/default.php, line 23
in this code below is space character after ...page_heading')); ?>

escape($this->params->get('page_heading')); ?>

Expected result

Without the end space character

Actual result

h1,h2 and date in article have last character as space, as picture shows

System information (as much as possible)

Joomla 3.8.2, PHP 5.6

Additional comments

avatar sraberus sraberus - open - 30 Nov 2017
avatar joomla-cms-bot joomla-cms-bot - change - 30 Nov 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Nov 2017
avatar brianteeman
brianteeman - comment - 30 Nov 2017

I am assuming you meant to attach a picture?

avatar sraberus
sraberus - comment - 30 Nov 2017
avatar brianteeman
brianteeman - comment - 30 Nov 2017

Whatever is causing the problem is not the code that you highlighted as that code is perfectly correct.

avatar sraberus
sraberus - comment - 30 Nov 2017

The code has "space" on the end of the line, one character. The "space" character is causing it.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18930.

avatar sraberus
sraberus - comment - 30 Nov 2017
avatar brianteeman
brianteeman - comment - 30 Nov 2017

If you look at the source code here there is no space

<?php echo $this->escape($this->params->get('page_heading')); ?>

avatar sraberus
sraberus - comment - 30 Nov 2017

Notepad++ show there is space, and test site is showing spaces after h1,h2 and date. So problem is where you think?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18930.

avatar C-Lodder
C-Lodder - comment - 30 Nov 2017

Browsers will render new lines as whitespace for inline (maybe inline-block too) elements. They get ignored for block elements. So firstly ensure you're <h1> hasn't been given the CSS property display: inline-block;.

Else you can simply remove the whitespace yourself:

<h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1>

or:

<?php echo '<h1>' . $this->escape($this->params->get('page_heading')) . '</h1>'; ?>
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Nov 2017
Category com_content
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Nov 2017
Status New Information Required
avatar joomla-cms-bot joomla-cms-bot - close - 1 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Dec 2017
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2017-12-01 09:08:39
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 1 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Dec 2017

closed as no Core-Issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18930.

Add a Comment

Login with GitHub to post a comment