-
Notifications
You must be signed in to change notification settings - Fork 139
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
Usage with unmapped field? #330
Comments
I worked out that the bundle will only accept fields that are mapped to a column in an entity. I fixed it manually but it would be nice to have a real option for this. |
So this basically means there is no way to manage translated files using VichUploaderBundle? @Dt-Sodium how did you fix it? |
@Dt-Sodium Would be great if you could present your solution :) |
I'm not sure anymore if this is the only thing i changed because it was a long time ago, but in if src/Form/Manipulator/DoctrineORMManipulator.php, before if line 48
I added
And add mapped = true in input configuration. But it's a pretty dirty fix. |
@webda2l Hello, I'm also trying to add an unmapped translated field in my form and meet the same error : -> Field(s) 'myfield' doesn't exist in App\Entity\myEntityTranslation
Is there any workaround to this ? Thanks |
Hello, |
Hello, Thanks @webda2l for the answer, I can now display my unmapped translated field in the form. My unmapped field is : media
Result :
Thanks |
|
Thanks a lot it works like a charm now ! |
that's almost like the issue AnnouncementTranslation.php (note: have getter and setter) /**
* @ORM\ManyToOne(targetEntity=Media::class)
*/
private $media; AnnouncementCrudController.php "fields" => [
"media" => [
"field_type" => MediaType::class,
"label" => "panel.announcement.fields.media",
"mapped" => true
]
]
|
i found that if (!$metadata->isAssociationInverseSide($assocName)) {
continue;
} to if (!$metadata->isAssociationInverseSide($assocName)) {
$assocsConfigs[$assocName] = [];
continue;
} but, sometimes I have to ManyToOne field using ? any help me ? |
Hi @tamert, The original issue seems to be fixed now — the other problem you're referencing seems to be with https://github.com/a2lix/AutoFormBundle if I'm not mistaken ? |
@tamert I have the same issue, did you fix it? |
Hello,
I'm trying to use the a2lix translation field with a file field that is not mapped in my entity as it will not be handled by the database, but it will not work because a2lix seems to ignore the "mapped=>false" option in the field configuration.
Is there a way around this?
Thanks
The text was updated successfully, but these errors were encountered: