Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8537345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:52:50+00:00 2026-06-11T10:52:50+00:00

Firstly I’m using version 2.4.7 of SilverStripe. I have a has_one relationship between a

  • 0

Firstly I’m using version 2.4.7 of SilverStripe. I have a has_one relationship between a DataObject I am using, with DataObjectManager, and another DataObject. I want to display the name of the DataObject in the summary fields of the DataObjectManager but I keep getting the error below.

Uncaught Exception: Object->__call(): the method ‘fortemplate’ does not exist on ‘Store’

I assume it is because I have it in a has_one relationship but I’m not sure. Does anyone have any suggestions about how I can do this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:52:51+00:00Added an answer on June 11, 2026 at 10:52 am

    You are getting that error because “Store”, when in the summary fields returns the Store object. Summary fields doesn’t quite know what to do with the object, so it checks to see if it has a “forTemplate” method, which would normally return the object rendered with a template or just a plain string.

    Here’s two options:

    1) create the forTemplate() method on you Store object, which returns the Title (or whatever field you want) of the Store.

    OR

    2) On your object that has the DataObjectManager field on it, create a getter method that returns the Title of the Store. ie..

    public function getStoreTitle(){
        return $this->Store()->Title
    }
    

    And then refer to that method in summary_fields ie…

    public static $summary_fields = array(
        'StoreTitle'
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly I want to thank all of you who have helped me understand Normalization
Firstly, I'm not using rails. This is vanilla ruby application. I've read about packaging
Firstly I design the site & convert it into HTML using Twitter bootstrap. The
Firstly, I just want to say that the gmaps4rails gem has been fantastic. Easy
Firstly, I have search Stack Overflow for the answer, but I have not found
Firstly, please forgive me if I have asked this before (i suffer memory problems
Firstly, the title was the best I could come up with. I have written
Firstly, Kohana's documentation is terrible, before people go read the docs I have read
Firstly my maths is limited, so this question may have a simple answer. So,
Firstly, I have created a custom list definition based on the Tasks list in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.