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 8255891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:40:59+00:00 2026-06-08T01:40:59+00:00

In a bundle I’m developing and was working correctly I added a new functionality

  • 0

In a bundle I’m developing and was working correctly I added a new functionality which involves adding a repository to the entity. Now, when I execute the newly added method I get the following error:

Warning: class_parents() [function.class-parents]: Class CmsPages does not exist and could not be loaded in /Applications/MAMP/htdocs/symfony-standard-2.1/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php line 40

The newly added code is:

Controller:

/**
 * Returns an json formated tree
 * 
 * @Route("/getTree", name="admin_cmsPages_getTree", options={"expose"=true})
 */
public function getTreeAction()
{

    $em = $this->getDoctrine()->getManager();
    $tree = $em->getRepository('CmsPages')->loadTree();


    $response = new Response(json_encode( $tree ));
    $response->headers->set('Content-Type', 'application/json');

    return $response;
}

Repository:

namespace Yanic\CmsBundle\Entity;

use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\NoResultException;

class CmsPagesRepository extends EntityRepository
{
    public function loadTree()
    {
        $q = $this
            ->createQueryBuilder('p')
            ->select('p')
            ->orderBy( 'p.lft' )
            ->getQuery()
            ;

        return $q->getArrayResult();
    }
}

That’s all that has changed… if any more code is needed for clarification I will post it.

So could anybody tell me what I’m doing wrong? I couldn’t find anything neither on SO nor on Google.

Thanks in advance

  • 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-08T01:41:01+00:00Added an answer on June 8, 2026 at 1:41 am

    I just found the error myself… the line

    $tree = $em->getRepository('CmsPages')->loadTree();
    

    has to be

    $tree = $em->getRepository('CmsBundle:CmsPages')->loadTree();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Init(); backthread tr=new backthread(); tr.execute(0,0,0); } backthread
I'm developing OSGI bundle which uses RingFIFOBuffer from the package org.apache.commons.collections This is the
I created a settings.bundle and added a few items. Now I am trying to
Bundle install was working perfectly yesterday but now it's returning this output in the
i made a new bundle, made a new controller made few entities entity does
I have created a bundle. However its not working when deployed to production server.
I removed the settings.bundle from an app I'm working on as it's no longer
I have the current bundle reference working locally: Bundles.Reference(/Content/global.css); On the development site, this
I'd like to bundle some data files with the Netbeans module i'm working on.
The Bundle and ContentValues classes seem to have pretty similar functionality. Is there an

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.