Closed webdevilopers closed 3 years ago
I managed to get the expected behaviour by downgrading to the following packages:
{
"require": {
"php": "^7.4",
"ext-ctype": "*",
"ext-iconv": "*",
"sonata-project/admin-bundle": "^3.93",
"sonata-project/doctrine-mongodb-admin-bundle": "^3.7",
"sonata-project/exporter": "2.4.0",
"symfony/apache-pack": "^1.0",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.12",
"symfony/framework-bundle": "4.4.*",
"symfony/yaml": "4.4.*"
}
}
Thanks for reporting! So if I had understood correctly, it works in the stable branch, but not in master
, we have a test for filtering using embeddable value, I'll also add to show the value.
Thanks for the fast response. That is correct!
@webdevilopers we've just updated master
branch, if you could give it a try to see if it works would be great.
I can confirm that it did work in ^3.7.0 with admin-bundle
^3.93
"sonata-project/admin-bundle": "^3.93",
"sonata-project/doctrine-mongodb-admin-bundle": "dev-master",
Testing dev-master
would require updating to admin-bundle
**4.***. That update is currently not possible for me.
Problem 1
- Can only install one of: sonata-project/admin-bundle[4.x-dev, 3.93.0].
- Can only install one of: sonata-project/admin-bundle[4.x-dev, 3.93.0].
- Can only install one of: sonata-project/admin-bundle[4.x-dev, 3.94.0].
- Can only install one of: sonata-project/admin-bundle[4.x-dev, 3.95.0].
- Can only install one of: sonata-project/admin-bundle[4.x-dev, 3.x-dev].
- sonata-project/doctrine-mongodb-admin-bundle dev-master requires sonata-project/admin-bundle 4.x-dev -> satisfiable by sonata-project/admin-bundle[4.x-dev].
- Installation request for sonata-project/doctrine-mongodb-admin-bundle dev-master -> satisfiable by sonata-project/doctrine-mongodb-admin-bundle[dev-master].
- Installation request for sonata-project/admin-bundle ^3.93 -> satisfiable by sonata-project/admin-bundle[3.93.0, 3.94.0, 3.95.0, 3.x-dev].
Hope this helps anyway?
Closing then, if it works
The problem was using master
branch, so we don't know for sure if it works, but at least the test I added works.
Sonata packages
The
SonataAdminBundle
is currently being prepared for Symfony 5. As @VincentLanglet states:https://github.com/sonata-project/SonataAdminBundle/pull/6476#issuecomment-800249328
That is why I use the recommended commit which worked fine for installing this bundle.
He also added:
If I understood correctly there could be an equivalent commit in this bundle that should work. But I couldn't figure out how to determine that commit. Maybe one can help me with is.
I suppose that commit could then possibly fix the bug I am going to describe. If so thanks in advance.
I defined an Admin Class for a
BusinessProfile
document. This document has an embeddedContactInformation
document.As far as I understand it should be possible to get the properties of the embed document via dot-notation:
But the
listView
throws Cannot access property "contactInformation.name".While the dot-notation does indeed work for the
datagridFilters
!My current workaround is a custom template:
But this way I have to use a single list field for the entire embed document. I would prefer separate ones for
name
,emailAddress
etc..Thanks in advance.