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
Updated by Markus Klein almost 13 years ago
Hello Eugen,
Thank you very much for this detailed report.
We are managing our code patches in our review system. (https://review.typo3.org)
Would you mind submitting your suggested change to our system?
This guide might help you:
http://wiki.typo3.org/Contribution_Walkthrough_Tutorials
Feel free to ask, if you have troubles.
Markus
Updated by Thorsten Kahler almost 13 years ago
- Status changed from New to Accepted
Updated by Eugen Weingart almost 13 years ago
Hello Markus,
after our tests with the new code we found out, that it's not the absolute answer.
It actually makes it better, but not perfekt.
As a side effect of the change a different unpleasant behavior appeared.
When you're loged in to the frontend, everything works fine.
When you're not loged to the frontend, the two page versions are not
placed exactly on the same position of the x- axis.
Additionally one can no longer scroll the bottom page (liveContainer)
as it no longer has its own scrollbar. One can only move the upper page
(wsContainer) and the whole page (both containers).
As I'm no specialist for JS and only have little knowledge about typo3 Core
I was hoping to point out the problem, for someone, who knows better than me.
Maybe the suggestion was not too far off.
You see, we actually weren't able to fix the problem completely, so it wouldn't
help, if we sent our suggestion to the review, as it would be denied.
Is it only possible to contribute, if I know exactly how to fix the problem completely?
Updated by Eugen Weingart almost 13 years ago
Well actually after further investigation I must say that it actually could be a kind of an answer.
The unpleasant behaviour I was talking about earlier is gone, as soon as you make the preview to full screen.
After that the window even may be scaled, but stil shows perfectly correct behaviour.
So the occured problems after the bugfix are just there, when the window is too small for the view.
That may help some more, although I still think there's something missing there.
Something to skip the scaling part (full screen and back)
Updated by Alexander Opitz almost 10 years ago
- Status changed from Accepted to Needs Feedback
- Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.9)?
Updated by Alexander Opitz over 9 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.