Project

General

Profile

Actions

Bug #30076

closed

Fe preview notification triggers Quirks Mode

Added by Falk no-lastname-given about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2011-09-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The frontend preview notification (<div id="typo3-previewInfo" ...>) is the first output before the DocType declaration and is in some cases responsible for HTML / CSS display errors.

This isssue is not present in TYPO3 4.x

Greetz Falk


Related issues 2 (0 open2 closed)

Is duplicate of TYPO3 Core - Task #13571: Implement previewInfo via hook_eofe()Closed2011-03-03

Actions
Is duplicate of TYPO3 Core - Bug #30897: Preview message causes javascript errorsClosed2011-10-13

Actions
Actions #1

Updated by Martin Kästner about 13 years ago

I have some problems with IE9 (some other version too, of course) with not showing layout of the website, when this previewInfo is on the site. I think it would be better to add it after the content on the end. In Version 4.4.4 I have the previewInfo as last element on the page. It is all fine.

I think this is a bug from inserting this code:

typo3_src-4.5.6\typo3\sysext\cms\tslib\index_ts.php
if ($sendTSFEContent) {
echo $TSFE->content;
}

with this the Content of the page is echoed as very last element. So the previewInfo get on top of the page. Then the layout is broken.

A solution is to add the previewInfo right before the closing body-Tag, just like the adminPanel-Code before the sendTSFEContent-Codepart. For this ...

1) the function previewInfo() in
typo3_src-4.5.6\typo3\sysext\cms\tslib\class.tslib_fe.php
should not echo its part, but return it:
return $temp_content;

2) then in typo3_src-4.5.6\typo3\sysext\cms\tslib\index_ts.php
the lines 541 ff.:

// *************
// Preview info
// *************
$TSFE->previewInfo();

could be:

// *************
// Preview info
// *************
$previewInfo = $TSFE->previewInfo();
if ($previewInfo!='') $TSFE->content = str_ireplace('</body>',  $previewInfo . '</body>', $TSFE->content);

This solves the layout problems, I think. Sorry, I didn't get a correct patch-file. Hope this helps anyway.

Actions #2

Updated by Steffen Gebert almost 13 years ago

  • Status changed from New to Closed

For TYPO3 4.5 resolved by #30897, for newer versions by #13571

Actions

Also available in: Atom PDF