ElkArte Community

Elk Development => Bug Reports => Topic started by: CrimeS on June 11, 2016, 02:54:57 pm

Title: Integration stray end tags 1.0
Post by: CrimeS on June 11, 2016, 02:54:57 pm
I've noticed a strange behaviour, that no matter what is in the files integrated with SSI, there are 2 divs that are closed, but not opened. They are added at the end just before the body tags (along with some scripts). Validator (http://validator.w3.org/check?verbose=1&uri=http://studiocrimes.com/int.php) of a test page where the content is as follows:
<?php

$ssi_layers = array('html');
$context['page_title'] = 'integration';
$context['html_headers'] = '
<link rel="stylesheet" href="home.css" />';

require_once('forum/SSI.php');


echo 'test';

ssi_shutdown();
?>



The problem will disappear, if we add body to the ssi_layers, but what if I only need the html layer?
Title: Re: Integration stray end tags 1.0
Post by: emanuele on June 11, 2016, 04:57:38 pm
Not really a bug, more a feature... not joking... lol
The stray open tags are intended to remain open because that way, using a layer, you can inject "stuff" into the footer and/or between the "main" template and the footer.
It has limitations, without doubts, but still is somehow easier than having tons of other kind of "flexible" stuff around.
Title: Re: Integration stray end tags 1.0
Post by: CrimeS on June 11, 2016, 05:56:27 pm
Quote from: emanuele – Not really a bug, more a feature... not joking... lol

Too funny to hear that. In this case it would be just okay to open them I suppose. Since it's not a bug, it might need to be moved to the right board.
Title: Re: Integration stray end tags 1.0
Post by: emanuele on June 12, 2016, 06:20:02 am
I know the feeling, I had the same reaction while writing it. LOL

Yep, you can just open the two tags.
In fact it could be considered a bug in the sense that they probably should be open in the corresponding above layer, it could make sense, but looking at it yesterday night it seemed "difficult" (in the sense that there was other stuff in there and so on, but maybe it could be changed.