[TYPO3-core] RFC: #15290: Bug: Wrong behaviour of workspace preview setting "Enable Frontend Preview"
Andreas Kiessling
andreas.kiessling at web.de
Tue Aug 24 00:39:53 CEST 2010
Hi Steffen,
>> class.typo3ajax.php was changed in revision 6333 to fix issue #12466
>> A response of 0 in this ajax request seems totally legitimate to me, but
>> is impossible with the check for "empty".
>>
>> Attached is v3 for 4.5 and v2 for 4.4
>> Forgot one ; in workspacemenu.js
>
> Andreas, what did you change there?
> > +155» » » » if(!response.setWorkspaceId)·{
> > +156» » » » » response.setWorkspaceId·=·0;
> > +157» » » » };·
> This can't be valid. The ; has to be removed (but it was also in the
> previous version).
Ah, so that's where the semi-colon went...
What i did change there: Switching to Live-Workspace should return a 0
in response.setWorkspaceId from the ajax request. But since the
addContent function in the ajax class checks for "empty" content (and 0
or "0" are empty for that check) it removes the key and there is no
"response.setWorkspaceId" set at all. So your browser never knows, that
you aren't in a workspace anymore and the check for "inWorkspace" to not
show the split view in live workspace always fails after switching back
to live.
addContent could be altered to check if $content is 0 so it won't strip
the key. But i did not want to break other places that use that function
(see the mentioned rfc/bugreport) and the check for the empty response
did not hurt. Would be definitely a cleaner solution though.
>
> Attached are a cleaner versions, after juggling a bit around with
> white-spaces ;-)
>
Thanks for taking care!
Regards,
Andreas
More information about the TYPO3-team-core
mailing list