symfony-cmf/tree-browser-bundle

TypeError: $(...).cmfTree is not a function

iBasit opened this issue · 12 comments

On dashboard im getting following error, even tho admintree, jstree and selecttree files are loaded.. i'm not sure what other files are required for this?

TypeError: $(...).cmfTree is not a function

You are using the development branch - which current requires that you include this twig file.

I'm using 1.2 for this bundle

ya I don't even see this file in my treeBundle. It only has tree.html.twig

I tried installing dev-master version, but now I'm getting following error:

Cannot load resource ".".

I think this error is generated by following

cmf_tree:
    resource: .
    type: 'cmf_tree'

kind of clueless now lol

Fixed it by adding following and also on dev-master branch for the treeBundle and removed cmf_tree route settings

cmf_resource:
    repositories:
        default:
            type: doctrine_phpcr_odm
            basepath: ~

Is this what tree should look like? I'm not sure how to edit or create on it.. there is no options on it.

image

YEs, if you enable the sonata admin enhancer for the ResourceRestBundle, you can see edit options.

Things are still in development, so create features are missing atm.

I have manage to add this, but still same result, which is tree opens and closes fine, but nothing happen on click (assuming it should open edit page or view page) - currently its just tree structure only which expands and collapse

cmf_resource_rest:
    enhancer_map:
        - { repository: default, enhancer: sonata_admin }

Check the config reference:

$ ./app/console config:dump-refdrence cmf_resource_rest

Something like enhancers:sonata_admin iirc.

If you want documentattion and stability use the stable version. What version of SonataPHPCRAdminBundle r u using? (composer show --installed)

SonataPHPCRAdminBundle dev-master because I'm using SonataAdminBundle 3.x, so because of it, I had to use lots of dev-master

cmf_resource_rest:
    payload_alias_map:

        # Prototype
        name:
            repository:           ~
            type:                 ~
    enhancer_map:
        repository:           ~ # Required
        enhancer:             ~ # Required

so have in config.yml

cmf_resource_rest:
    enhancer_map:
        - { repository: default, enhancer: sonata_admin }

I suggest you to not use all dev things yet. It's far from stable. Just use SonataAdminBundle 2.3 with CMF 1.3 and you'll have full docs and a working set of features.

It's not an option, but do wish it tho, makes life easier.

Do you know why tree is not still editable? its still showing list only and can't do edit, after enabling enhancer

Do you know why tree is not still editable? its still showing list only and can't do edit, after enabling enhancer

No idea by seeing these configuration snippets. The CMF sandbox master branch works with CMF 2.0-dev. This has the edit dropdown box: http://sandbox.cmf.symfony.com/en/admin/dashboard Can you maybe compare your set-up with that project and see what's different?