Closed netproject0 closed 6 years ago
Bonsoir @emilieD68 , En l'absence de réponse de @sebheitzmann As tu une idée sur le problème que je rencontre ?
Merci à toi.
Désolé, j'étais en congé semaine derniere. Sorry.
For the second point, you need the templating component. Do you have it installed ? I will check the dependencies.
For the filter i will try it on my project to check the compatibility.
The templating is in the dependency. Could you please send me your composer.json ?
Now, I display a nestedSets tree but i feel Symfony/vendor/2lenet/easyadmin-plus-bundle/src/Resources/views/FilterType/treeFilter.html.twig is no apply on it (cf screenshoot) : My items are not sorted.
The tree filter is a filter for another easyadmin entity to display a nested dropdown. please have a look on https://github.com/2lenet/EasyAdminPlusBundle/blob/master/doc/chapter-6.md
You could be able to combine tree and filter on the same entities but definitly not filter an entity by itself.
The items are sorted by the order defined in the nestedset. For the future we will certainly add some UI for reordering in the screen.
@sebheitzmann : Thank for your feedback. J'espère que les vacances furent bonnes :) since my last post, i've done a fresh install of Sf4. The problem is always display :
Unable to find template "LleEasyAdminPlusBundle:form:widget.html.twig" (looked into: /Applications/MAMP/htdocs/smArt/Gallery/templates, /Applications/MAMP/htdocs/smArt/Gallery/vendor/2lenet/easyadmin-plus-bundle/src/Resources/views/form, /Applications/MAMP/htdocs/smArt/Gallery/templates, /Applications/MAMP/htdocs/smArt/Gallery/vendor/symfony/twig-bridge/Resources/views/Form).
This is my composer.json (i've got template component)
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"2lenet/easyadmin-plus-bundle": "^1.0.8.19",
"easycorp/easyadmin-bundle": "1.17.13",
"sensio/framework-extra-bundle": "^5.2",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/console": "^4.1",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^4.1",
"symfony/lts": "^4@dev",
"symfony/maker-bundle": "dev-master",
"symfony/templating": "^4.1",
"symfony/web-profiler-bundle": "^4.1",
"symfony/yaml": "^4.1"
},
"require-dev": {
"symfony/dotenv": "^4.1",
"doctrine/doctrine-fixtures-bundle": "^2.3"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": true
}
}
}
===> FYI, Since our last conversation i try to change conf/twig.yaml
twig:
paths:
'%kernel.project_dir%/templates' : ~
'%kernel.project_dir%/vendor/2lenet/easyadmin-plus-bundle/src/Resources/views/form/' : LleEasyAdminPlusBundle
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
form_themes:
- '@LleEasyAdminPlusBundle/form/widget.html.twig'
Now, the error is :
Unable to find template "@LleEasyAdminPlusBundle/form/widget.html.twig" (looked into: /Applications/MAMP/htdocs/smArt/Gallery/vendor/2lenet/easyadmin-plus-bundle/src/Resources/views/form).
Thanks you for your assistance.
Best
@sebheitzmann : Ok for tree filter i've got it :) "Embrouillage de pinceaux"
for the template problem could you please do the following :+1:
composer require templating
frameworks:
templating:
engines: ['twig']
Ok my error about "widget.html.twig" have now disappear ! Thank a lot !
@sebheitzmann Last problem, I promise... When i try to display the tree i've a new error
Uncaught PHP Exception Twig_Error_Runtime: "Impossible to access an attribute ("id") on a boolean variable ("")." at /Applications/MAMP/htdocs/smArt/Gallery/vendor/2lenet/easyadmin-plus-bundle/src/Resources/views/default/list.html.twig line 210
My easy_admin.yaml :
Service:
class: App\Entity\OeuvrechCategorization
tree: true
disabled_actions: []
list:
title: 'Catégorisation des Oeuvres'
help: 'help ?'
max_results: 500
And thank you so much for your help Best.
I thinks that this problem is know resolved. The problem was with the order by on the table. It must be ordered by root_id and lft. But EasyAdmin only let you specify one sort field. I have forced the order in nested tree. By the way you can't set another order if you want a tree view.
Sorry for the late answer
@sebheitzmann From https://github.com/EasyCorp/EasyAdminBundle/issues/2269 i continue here :
Hi, Dummy question :D => To install your Extension, is it :
1 / "composer require lle/easyadmin-plus-bundle" => From the doc on https://github.com/2lenet/EasyAdminPlusBundle With this i've an console error =>
Or
2 "composer require 2lenet/easyadmin-plus-bundle" => From the firstline on https://packagist.org/packages/2lenet/easyadmin-plus-bundle ? With this, i can install Extension, i follow your guidelines and when i load my administration i've this error :
What i've miss ?
---------EDIT ------------- 1 hour later : I've found a dirty way to resolve my pb :
/Symfony/vendor/2lenet/easyadmin-plus-bundle/src/DependencyInjection/LleEasyAdminPlusExtension.php L26
definitly a bad practice, i know... There is other way ?
Now, I display a nestedSets tree but i feel Symfony/vendor/2lenet/easyadmin-plus-bundle/src/Resources/views/FilterType/treeFilter.html.twig is no apply on it (cf screenshoot) : My items are not sorted.
After few tests, i've found that i never enter in the "if" :
Is it a track ?
FYI : => my /Symfony/config/packages/easy_admin.yaml
=> my packages:
Thank for you support.
Best.