Bug #33785
closedPreview Module (Slider preview)
0%
Description
Hi, my name is Eugen Weingart,
I am the admin for Typo3 in our company and we detected a bug on our last update on the preview module (JS).
We managed to fix the bug, but it might be helpful for your team to know what it was, so it can be fixed some time.
But first things first.
The problem occurred whenever someone wanted to see a preview from the workspace and compare it to the live version
with the slider preview. Additionally you need to be loged in to the page in the frontend.
(happened because we needed to see the preview of our changes on a site which is only visible to users that are logged in)
In that very case the preview only uses approximately 1/5 of the page (top) and the rest of the page remains blank.
Although the functionality remains untouched, it’s quite hard to work with this.
Our changes were done in the preview.js (\typo3\sysext\workspaces\Resources\Public\JavaScript\preview.js)
In there you need to modify the sliderSetup. The layout-attribute of the wsContainer and liveContainer is set to 'absolute' there.
When it's changed to 'fit' the bug seems to be gone
To be more precise:
Before bugfix:
var sliderSetup = {
layout: 'fit',
x: 0, y:0,
anchor: '100% 100%',
autoScroll: true,
items: [{
layout: 'absolute',
id: 'visualPanel',
items: [{
x: 0, y:0,
anchor: '100% 100%',
id: 'wsContainer',
!!!!!!! * layout: 'absolute',* !!!!!!!!!!!!!!
autoScroll: false,
items:[{
xtype: 'iframePanel',
x: 0, y:0,
id: 'wsPanel',
doMask: false,
src: wsUrl,
autoScroll: false
}]
},{
x: 0, y:0,
anchor: '100% 0%',
id: 'liveContainer',
!!!!!!!!!!!!!!! layout: 'absolute', !!!!!!!!!!!!!!
bodyStyle: 'height:0px;border-bottom: 2px solid red;',
autoScroll: false,
items:[{
xtype: 'iframePanel',
x: 0, y:0,
id: 'livePanel',
doMask: false,
src: liveUrl,
autoScroll: false
}]
}]
}]
};
After bugfix:
var sliderSetup = {
layout: 'fit',
x: 0, y:0,
anchor: '100% 100%',
autoScroll: true,
items: [{
layout: 'absolute',
id: 'visualPanel',
items: [{
x: 0, y:0,
anchor: '100% 100%',
id: 'wsContainer',
!!!!!!!!!!!!!!!!!!!!!!! * layout: 'fit',* !!!!!!!!!!!!!!
autoScroll: false,
items:[{
xtype: 'iframePanel',
x: 0, y:0,
id: 'wsPanel',
doMask: false,
src: wsUrl,
autoScroll: false
}]
},{
x: 0, y:0,
anchor: '100% 0%',
id: 'liveContainer',
!!!!!!!!!!!!!!!!!!!!!!! layout: 'fit', !!!!!!!!!!!!!!!!!
bodyStyle: 'height:0px;border-bottom: 2px solid red;',
autoScroll: false,
items:[{
xtype: 'iframePanel',
x: 0, y:0,
id: 'livePanel',
doMask: false,
src: liveUrl,
autoScroll: false
}]
}]
}]
};
After these changes the preview works as it should (as far as I can tell).
It would be great, if your team could analyze the behavior of the core system in the
described case. And if our propose is valid and it actually does fix the problem we would be very
glad if you could change that, so that no one has to do changes in the typo3 source for that reason
in the coming updates any longer.
Thank you very much.
My regards,
Eugen Weingart