Bug #34148

t3lib_loadDBGroup::start() does not recognize a multitable relationship if $MM_oppositeFieldConf['allowed'] is "*"

Added by Markus Opahle over 10 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2012-02-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

t3lib/class.t3lib_loaddbgroup.php:109-114

if ($this->MM_oppositeFieldConf['allowed']) { $oppositeFieldConf_allowed = explode(',', $this->MM_oppositeFieldConf['allowed']); if (count($oppositeFieldConf_allowed) > 1) { $this->MM_isMultiTableRelationship = $oppositeFieldConf_allowed[0]; } }

should be:

if ($this->MM_oppositeFieldConf['allowed']) { $oppositeFieldConf_allowed = explode(',', $this->MM_oppositeFieldConf['allowed']); if (count($oppositeFieldConf_allowed) > 1 || $this->MM_oppositeFieldConf['allowed']=='*') { $this->MM_isMultiTableRelationship = $oppositeFieldConf_allowed[0]; } }

Files

#1

Updated by Markus Klein over 10 years ago

Hello Markus,

Do you mind pushing this patch to gerrit?

Thanks, Markus

#3

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9150

#4

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9150

#5

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9156

#6

Updated by Steffen Gebert over 10 years ago

  • Category set to Backend API

Could you please add information, how to easily repoduce this bug?

#7

Updated by Markus Opahle over 10 years ago

Steps to reproduce:

1. Install the attached extension (it depends on dam to have a multitable mm relation)
2. The Extension provides 2 Models "Foo" and "Bar". Create one Record of each Model and add some images to the images field of these records.
3. Check that both Records have the same id
4. Make a copy of one of these records and check the images relation of the copy.
5. Note that the new copy has the images form both records (Foo and Bar), which is wrong.

Apply the patch and redo step 4 and 5 to see that this works as expected now.

Please note that the bug is not related to the dam extension. It is just used to keep the example simple. You can reproduce this with any other mm relation which uses a "tablenames" field to refer to multiple tables.

#8

Updated by Markus Opahle over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#9

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/9580

#10

Updated by Markus Opahle over 10 years ago

  • Status changed from Under Review to Resolved
#11

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13015

#12

Updated by Markus Opahle almost 10 years ago

  • Status changed from Under Review to Resolved
#13

Updated by Benni Mack almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF