Bug #61268
closedUpdating MM releations doesn't respect tablenames and fieldname fields
100%
Description
When updating existing linked objects the fields tablenames and fieldname are not respected.
As result:
UPDATE sys_category_record_mm SET sorting_foreign='1', tablenames='tx_eventsmanager_domain_model_event', fieldname='categories WHERE uid_foreign=21 AND uid_local=91 AND tablenames='tx_eventsmanager_domain_model_event'
is executed instead of
UPDATE sys_category_record_mm SET sorting_foreign='1' WHERE uid_foreign=21 AND uid_local=91 AND tablenames='tx_eventsmanager_domain_model_event' AND tablenames='tx_eventsmanager_domain_model_event' AND fieldname='categories
This breaks existing mm releations
Updated by Gerrit Code Review about 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 http://review.typo3.org/32505
Updated by Alexander Opitz about 10 years ago
Hi Frans, after reading the code, may it be that your written SQL Statements aren't correct? Or am I wrong and need to take a deeper look? ;)
Updated by Frans Saris about 10 years ago
Please have a look at the patch, think you get the point then.
Could be that I made a mistake in the SQL above (was no real cut/paste work :) ).
Updated by Alexander Opitz about 10 years ago
Ok, so you did make a mistake ... but I get the point.
Can we also fix the docblock of the updateRelationInRelationTable function in TYPO3\CMS\Extbase\Persistence\Generic\Backend which uses the code path this patch is fixing? The docblock seams a Copy&Paste from Insert.
Updated by Gerrit Code Review about 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 http://review.typo3.org/32505
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 http://review.typo3.org/32505
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Updated by Tymoteusz Motylewski about 10 years ago
How can I test patch /reproduce the problem?
Updated by Frans Saris about 10 years ago
Add extra categories to an existing extbase object with already a category assigned.
Best to have 2 or more different object types (with same uids) with same categories assigned and have a look at all set relations after you added more categories to one of the objects.
Updated by Gerrit Code Review about 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Updated by Gerrit Code Review about 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32673
Updated by Frans Saris about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cd0661c843853b84d35b295b3f6cfedb529d7641.