Bug #34148
closed
t3lib_loadDBGroup::start() does not recognize a multitable relationship if $MM_oppositeFieldConf['allowed'] is "*"
Added by Markus Opahle over 12 years ago.
Updated about 6 years ago.
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
Hello Markus,
Do you mind pushing this patch to gerrit?
Thanks, Markus
- Status changed from New to Under Review
- Category set to Backend API
Could you please add information, how to easily repoduce this bug?
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.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF