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

Missing labels in form for translatable custom entities #10

Open
hostep opened this issue Feb 5, 2016 · 3 comments
Open

Missing labels in form for translatable custom entities #10

hostep opened this issue Feb 5, 2016 · 3 comments
Assignees

Comments

@hostep
Copy link

hostep commented Feb 5, 2016

Hi guys

I'm working on setting up a new PIM with related entities which you can manage using the CustomEntityBundle.
We have a PIM with 2 locales and some fields for the related entity should be translatable.
I'm basing my custom bundle on this demo, since it is really helpful to get everything up and running.

But I now just ran into something which doesn't look quite right: on the form of the custom entity I see two columns for the values of the fields, but there are no labels in front of the fields.

I took some screenshots using this demo with the Pictogram entity:
screen shot 2016-02-05 at 16 38 15

Also, on the grid, the value is mising:
screen shot 2016-02-05 at 16 38 36

I've opened this issue on this demo project since I don't know if the demo is wrong, or if there is a bug in the CustomEntityBundle itself?

Relevant packages in use:
akeneo/pim-community-dev v1.4.18
akeneo-labs/custom-entity-bundle v1.6.0

Thanks!

@fitn fitn added the bug label Feb 12, 2016
@jmleroux
Copy link
Contributor

hello @hostep ,

If your project is not too advanced, I suggest you to upgrade to Akeneo 1.5.
Anyway, i'll try to reproduce your problem and get back to you soon.

JM

@hostep
Copy link
Author

hostep commented Apr 13, 2016

Hi @jmleroux

Our project has an experimental branch which runs Akeneo 1.5.1, and the problem still exists.
There used to be a similar issue a couple of weeks ago, on the pim-community-standard project, but Akeneo decided to close all the issues over there, so I can't find it anymore.

@jasperdcbe over there, mentioned we could copy the file:
/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UIBundle/Resources/views/Form/pim-fields.html.twig to /app/Resources/PimUIBundle/views/Form/pim-fields.html.twig and change this:

...
{% block pim_translatable_field_row %}
    {{ form_errors(form) }}
    <table class="table table-condensed">
...

into:

...
{% block pim_translatable_field_row %}
    {{ form_errors(form) }}
    {{ form_label(form) }}
    <table class="table table-condensed">
...

Which mostly fixes the problem.

There were some other issues also, which I explained on the forums (https://www.akeneo.com/forums/topic/custom-entities-need-some-help-with-translations-field-types-image-uploads/), but we got around most of them by adding 'required' & 'widget' properties to the buildForm method of our CustomEntityType (even though I believe this shouldn't be necessary, Akeneo should be smart enough to figure those out by itself, I think).

Anyway, would be great if some of these issues could be fixed in an upcoming new version.

Thanks!

@jmleroux
Copy link
Contributor

I'll investigate, but it seems more like an enhancement and not a bug.
Thanks for reporting !

@jmleroux jmleroux added enhancement and removed bug labels Apr 13, 2016
@jmleroux jmleroux self-assigned this Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants