7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » ManyManyDataObjectManager not grabbing the Title correctly
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 1357 Views |
-
ManyManyDataObjectManager not grabbing the Title correctly

29 June 2009 at 10:23am
Hello.
I just set up a ManyManyDataObjectManager instead of the complextablefield and I am having the strangest issue ever.
The object in question inherits Sitetree directly so the fields I've got access to are the ones in the Sitetree table.Now if I set the field to anything but Title, it displays the value from that field but if I set the value to Title it displays the id with a # in front.
Right now it looks like this and it works the way you'd expect. However if I switch out URLSegment for Title it all goes bonkers. If I grab the tables ID or anything else that works fine as well.
$modulesTablefield = new ManyManyDataObjectManager(
$this,
'Products',
'ProductPage',
array(
'URLSegment' => 'Title', 'Created' => 'Created'
), 'getCMSFields_forPopup');
$modulesTablefield->setAddTitle( 'A Product' );$fields->addFieldToTab( 'Root.Content.Products', $modulesTablefield );
return $fields;
}
If I run this as a regular ManyManyComplexTableField I get the title the way I should so I'm thinking it's something the class does.Any ideas?
Kindly, Marcus.
-
Re: ManyManyDataObjectManager not grabbing the Title correctly

29 June 2009 at 11:45am
That's a really old bug. When did you last update your code?
-
Re: ManyManyDataObjectManager not grabbing the Title correctly

29 June 2009 at 7:25pm
Umm I downloaded the latest code yesterday and ran it on my computer.
I will try again now with the latest code but as far as I know, I was running the latest stable release.Since I'm new to Silverstripe the oldest code I could be running would be about a week old.
I'll report back with my results.
-
Re: ManyManyDataObjectManager not grabbing the Title correctly

3 July 2009 at 7:47am
I've the same problem, using both the latest built available here and a fresh svn co. (rev 202). Any chance to fix this?
Thanks! -
Re: ManyManyDataObjectManager not grabbing the Title correctly

3 July 2009 at 8:17am
Wow.. Thank God for SVN. I was able to track down the change I made several months ago and see that, while it had been applied to MMDOM, i had pasted it in above the old code rather than replacing it, so it was running correctly, then undoing itself.
Give it an update and see what happens.
-
Re: ManyManyDataObjectManager not grabbing the Title correctly

3 July 2009 at 8:29am
Thanks for the quick reply!
Unfortunately, this is what happens at rv 203:
[Notice] Undefined variable: items
GET /admin/?flush=1Line 105 in /Users/Hubertus/Sites/30tage/dataobject_manager/code/HasManyDataObjectManager.php
Again, thanks for your help!
-
Re: ManyManyDataObjectManager not grabbing the Title correctly

3 July 2009 at 8:43am
Hmm.. I don't have a testing environment set up for MMDOM.. so I'll have to use you. Try now?
-
Re: ManyManyDataObjectManager not grabbing the Title correctly

3 July 2009 at 8:49am
Admin page loads with DOM, but we're back to original problem: title not picked up, instead table shows "#ID" with ID being the number. My custom getter doesn't work either...
Thanks!
| 1357 Views | ||
| Go to Top | Next > |

