Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Create Board Error #47

Open
austinh opened this issue May 25, 2015 · 7 comments
Open

Admin Create Board Error #47

austinh opened this issue May 25, 2015 · 7 comments

Comments

@austinh
Copy link
Contributor

austinh commented May 25, 2015

I am getting the following error:

Neither the property "category" nor one of the methods "getCategory()", "category()", "isCategory()", "hasCategory()", "__get()" exist and have public access in class "CCDNForum\ForumBundle\Entity\Category".

I cannot seem to figure out why this is happening. I have tried to fix it myself, but someone please let me know what's going wrong.

@roberto-slopez
Copy link

I have the same problem :(

@austinh
Copy link
Contributor Author

austinh commented Jul 4, 2015

@reecefowell @luct Any help here? Thanks

@reecefowell
Copy link
Member

Sorry I don't maintain any of this anymore. If anyone would like take over CCDN I can make them members of the codeconsortium organisation.

@cbwilkes
Copy link

cbwilkes commented Sep 9, 2015

@austinh @roberto-slopez Were any of you able to figure this out?

@cbwilkes
Copy link

In case someone else needs it. I figured it out. Hopefully the code in the repository can be fixed.

In the BoardCreateFormType::buildForm form builder the "group_by" was referencing "category.forum.name" when it seems like it should be "forum.name"

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        ->add('category', 'entity',
            array(
                'property'           => 'name',
                'class'              => $this->categoryClass,
                //'group_by'           => 'category.forum.name',
                'group_by'           => 'forum.name', //<--------- Change group_by to this
                'query_builder'      =>
                    function (EntityRepository $er) {
                        return $er
                            ->createQueryBuilder('c')
                            ->leftJoin('c.forum', 'f')
                            //->groupBy('c.forum')
                        ;
                    },
                'data'               => $options['default_category'],
                'required'           => false,
                'label'              => 'category.label',
                'translation_domain' => 'CCDNForumForumBundle',
            )
        )

......

@NOaMTL
Copy link

NOaMTL commented Oct 5, 2015

Thank you !
I am having so much troubles trying to get everything working on SF 2.7.5
If someone got it working fully, let me know.
Thank you.

@lighta971
Copy link

@cbwilkes it works, thanks.

fabianfabian added a commit to wizzbitnl/CCDNForumForumBundle that referenced this issue Dec 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants