[TYPO3-workspace] Create/Move new page behind moved page results in weird behaviour

Dennis Ahrens dennis.ahrens at googlemail.com
Tue Jan 10 19:35:40 CET 2012


Dear list,

i've struggled with a problem related to workspaces today (TYPO3 4.6.1 
with shipped workspaces and version extensions). Let me explain with a 
sample scenario.

Fresh workspace without changes:

- Move page M that is located behind X as a child of Y to any other 
location.

- Now we create a new page N behind our moved page M (using the pagetree 
drag & drop) - the page seems to be located correct, but if you refresh 
the pagetree this new page N is not at the intended location anymore.

- Searching the tree shows that it became a child of Y behind the page 
X, which was the old location of M.

This behaviour is reproduceable and you also ran into this issue, if you 
move a new page behind a moved page (after creating it somewhere else), 
which makes the bug really annoying for a user that currently tries to 
reorganize a big pagetree over a long run.

I had a look into the git commit log of the version extension and found 
a commit [1] related to this issue. The added code seems to do what 
crashes in the described sceneario (determining the correct pid of the 
placeholder), but moveRecord_wsPlaceholders is only called if the record 
is not new or deleted. There seems to be some reasons, why new records 
were not passed - removing the condition leads to pagetree exceptions 
(but the record is located at the correct position after reloading... 
and moving around a new-placeholder works without errors that way).

My first approach was to move the "new record" handling from tcemain 
into version itself to respect the placeholders there, but the code that 
handles this depends on a bunch of stuff inside tcemain - somewhere in 
the middle of the beast process_datamap.

Another approach will be working around this crude bunch by post process 
the new placeholder when it gets moved... with a new or an existing hook 
(workspace ships one, that is called after everything was done).

Any hints and suggestions from people familiar with version/workspaces 
and a confirmation of this behaviour in other environments are very much 
appreciated.

I'm looking forward to find a solution tomorrow.

Thanks in advance and regards
Dennis

[1] 
http://git.typo3.org/TYPO3v4/CoreProjects/workspaces/version.git?a=commit;h=8f847c0c87504476301dc567cb75cf0769649b62


More information about the TYPO3-team-workspace mailing list