Bug #44795
closedPage tree - Copy page (and paste) - preview images (often missing)
Added by Andreas Allacher about 11 years ago. Updated over 5 years ago.
100%
Description
Hello,
this problem does not seem to happen all the time but quite often.
I have a page with an image, copy that page and paste it.
Then I open the pasted page in Columns or Language view.
On that view the preview image is missing. However, if I open the page in the frontend it is there. If I open the content elment and save it, the preview image is again there too.
I am using the current git master branch.
Files
AfterSave.png (93.5 KB) AfterSave.png | This is the backend view after I press save on the content element that misses the preview image | Andreas Allacher, 2013-01-28 11:04 | |
BeforeCopy.png (82.9 KB) BeforeCopy.png | Displays page used to copy before copied | Andreas Allacher, 2013-01-28 11:04 | |
BeforeInsert.png (76.4 KB) BeforeInsert.png | Just shows how I inserted the copied page | Andreas Allacher, 2013-01-28 11:04 | |
AfterInsert.png (67 KB) AfterInsert.png | Shows how the copied page looks like | Andreas Allacher, 2013-01-28 11:04 | |
Frontend.png (63.8 KB) Frontend.png | This is the frontend view where the image is displayed correctly (it is only missing in the backend) | Andreas Allacher, 2013-01-28 11:04 | |
ButImageIsThere.png (92.2 KB) ButImageIsThere.png | Although no preview image, the image reference is copied correctly. | Andreas Allacher, 2013-01-28 11:04 |
Updated by Oliver Hader about 11 years ago
- Status changed from New to Needs Feedback
I could not reproduce this behaviour on current Git master.
Can you please add screenshots to see, what's going on?
Updated by Andreas Allacher about 11 years ago
- File AfterSave.png added
- File BeforeCopy.png added
- File BeforeInsert.png added
- File AfterInsert.png added
- File ButImageIsThere.png added
- File Frontend.png added
No Problem.
Here are some screenshots.
I added the corresponding descriptions to each file.
As said I am not always able to reproduce this bug myself.
Also I checked out the current version before creating those screenshots.
Updated by Andreas Allacher about 11 years ago
- File AfterSave.png AfterSave.png added
- File BeforeCopy.png BeforeCopy.png added
- File BeforeInsert.png BeforeInsert.png added
- File AfterInsert.png AfterInsert.png added
- File Frontend.png Frontend.png added
- File ButImageIsThere.png ButImageIsThere.png added
Updated by Georg Ringer about 11 years ago
problem identifiet: tt_content, field image
is empty in copy but should have the count of images inside
Updated by Andreas Wolf about 11 years ago
Georg Ringer wrote:
problem identifiet: tt_content, field
image
is empty in copy but should have the count of images inside
I think this is more an IRRE/TCEmain problem than really related to FAL, isn't it?
Updated by Jigal van Hemert almost 11 years ago
- Status changed from Needs Feedback to New
Updated by Ernesto Baschny over 10 years ago
- Category changed from File Abstraction Layer (FAL) to 978
- Priority changed from Should have to Must have
If I manually set the "image" field to "0" or "NULL" via SQL it does not affect the preview in the backend at all. So the reason must be somewhere else.
I could reproduce that only in a WORKSPACE situation (which from the screenshots is not the users use-case). Next time I see it happening I will try to figure out what's "in the database" at that time...
But I also agree that this is most probably an IRRE problem. :)
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26552
Updated by Alexander Stehlik over 10 years ago
I think I found the problem. Quote form core mailing list:
Hi guys,
I'm not sure but I think I found a conceptional problem with inline records that are stored in the same page as their parents.
I found this by researching the cause of:
http://forge.typo3.org/issues/44795 and
http://forge.typo3.org/issues/44964Lets assume we have a page with a tt_content element that uses a sys_file_reference. We now copy that page. This is what happens:
DataHandler->copySpecificPage() loops over all configured tables and copies the records in that page.
If sys_file_reference appears first in the tables array (which seems to be the case currently) the sys_file_reference record is copied (a new record with identical data but a different PID appears in the sys_file_reference table). The records still points to the content element in the old page though.
Now the tt_content element is copied which has a reference to an inline sys_file_reference record. This is done by copyRecord_procBasedOnFieldType() which finally calls copyRecord_raw(). In this method it is checked, if the record is already copied by calling isRecordCopied(). Since the record WAS already copied further processing is skipped.
Has anyone a good idea how to solve this? Maybe in copyRecord_raw() override the data of the related record isRecordCopied() returns TRUE?
I wish you all a merry Christmas
Cheers,
Alex
The patch pushed to Gerrit makes sure that even if the records have been copied before when looping over the tables the inline records still get updated.
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26552
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26552
Updated by Alexander Stehlik about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c81102bfbd71b8de62a9e9bc4c0c52e773ecd1b0.
Updated by David Gurk almost 10 years ago
Is their a reason why this fix is not included in TYPO3 v6.1?
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30468
Updated by Gerrit Code Review almost 10 years ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30469
Updated by Alexander Stehlik almost 10 years ago
Good point, David. Patch for 6.1 was pushed to Gerrit.
Updated by David Gurk almost 10 years ago
Hi Alexander,
will this patch be available with the next update?
Thanks and greetings
David
EDIT:
Ah, it's allready their. =) Thanks
Updated by Oliver Hader over 9 years ago
- Status changed from Under Review to Resolved
- Complexity set to medium
- Is Regression set to No
Alright, merged now for TYPO3 CMS 6.1.11 as well...
Updated by Michiel Roos over 9 years ago
Andreas, did the patch solve your issue?