DataHandler - process_cmdmap - Canceled during execution - multiple images on original content
If I use DataHandler with process_cmdmap on multiple pages at once (sublevels) and stop its execution,
the original copied page and already processed subpages have "cloned" their image file references in content elements.
The reason seem to be that normally the reference is re-mapped at the end of the copy process (process_cmdmap).
However, if I copy multiple sublevels this might not be such a good idea.
I have added screenshots that demonstrate the problem.
I am using the current git version.
#2 Updated by Oliver Hader over 6 years ago
Hm... hard to tell... are there any TCEmain/DataHandler Hooks used that manipulate the processing?
Besides that in the 3rd screenshot I spotted that the copied page seems to have the same UID as the original page which might be the origin of the behavior concerning page resolving.
#3 Updated by Andreas Allacher over 6 years ago
The UID is definitely correct later on (you can't even store a page with the same UID in the db as the UID is the only primary key) I might have refreshed too soon or something because I wanted to stop the copy process before the "issue" is not visible anymore. The issue still exists even if the UID was correct from what I remember.
#5 Updated by Mathias Schreiber over 4 years ago
- Status changed from New to Needs Feedback
- Assignee changed from Oliver Hader to Mathias Schreiber
- Is Regression set to No
tbh I am not sure what to do with this.
Aborting a request will break almost everything and unless we introduce transactions to all queries handled by DataHandler there is just no way to fix this.
#6 Updated by Andreas Allacher over 4 years ago
Execution can be stopped e.g. by pressing ESC during a request where DataHandler is executed.
Most of the time this will not take long. However, if one e.g. copies a whole pagetree it can take some time.
Shouldn't the images just be added correctly to the "new" elements, instead of the old one? That way the old elements will not get double images.
The worst case that would invoke would be that not all content elements/images are copied but as those are copies. I can just delete them and redo the copy process.
It is way more complex if the original content is modified.
Another way might be to involve the workspaces somehow, e.g. set workspaceId during creation to -9999 and then Update all -9999 at the end to 0?
Seems I forgot to setup a Watch on this ticket and forgot all about it because it really does not happen often that one cancels the execution of the DataHandler. Especially, if one knows about the issues involved.
#7 Updated by Alexander Opitz about 4 years ago
- Category changed from File Abstraction Layer (FAL) to Backend API
- Status changed from Needs Feedback to New
- Target version set to 8 LTS
- Complexity set to hard
The fact isn't FAL depended, it is overall backend processing. But this is very hard to solve and won't happen for 7.