[TYPO3-core] RFC #14365: Bug: Install Tool skin is sometimes wrong

Lars Houmark lars at houmark.com
Tue May 11 20:02:01 CEST 2010


Hi,

This is a SVN patch request.

Type: Bugfix

BT reference: http://bugs.typo3.org/view.php?id=14365

Branches: trunk

Problem:
	The Install Tool in 4.4 can run in two skin modes. One for being loaded 
in the backend (light) and one for being loaded as "standalone" (dark).

Currently, if you load the standalone version first and then login to 
the backend and load the Install Tool from there, it will use the design 
skin of the standalone (dark).

The detection is currently session based and does only happen on the 
initial load. As soon as the session is created there will be no more 
checks for which environment the Install Tool is running in.

Solution:
	Switch to a JS only approach that checks if the current document 
location is the same as the top location, meaning, is the document 
loaded in a frame or not. If it is not loaded in a frame, the body gets 
a class="standalone" added which equals to the re-factored CSS.

While doing the patch, I merged the CSS for the standalone version into 
the main version and prepended all classes with "body.standalone". This 
also makes the Install Tool use one less CSS file.

How to test:
	It can sometimes be hard to reproduce the problem, but recently I've 
had the wrong skin more than the correct (which was the reason for this 
patch). Reading the current code also makes it obvious that it might 
fail in some situations as it relies in HTTP_REFERER which can be 
blocked in some environments and as it will only do the check once, like 
described earlier.

Besides that, to test that the patch is working, apply it and try load 
in the Install Tool both from the backend and as standalone.

Notes: The install.js file was currently only used for the encryptionKey 
JS code, and in order to not introduce another JS file, I decided to put 
the code inside that file. Prototype and this file will be loaded on all 
pages now (before only on the ones needing it) but since caching will be 
in place I see that as no problem.

The diff file will not show that install_standalone.css can be deleted, 
but it can on commit, since the contents is moved to install.css.

--
Lars Houmark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14365.diff
Type: text/x-diff
Size: 10594 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100511/b15b5661/attachment-0001.diff>


More information about the TYPO3-team-core mailing list