[TYPO3-mvc] Frontend plugin and m:n relation

Anthony sanosuke303 at yahoo.fr
Tue Jan 14 19:03:35 CET 2014


Hi everybody,

I am developing an extension using extbase builder and I created two model, Consultant and Categories, which are linked with a m:n relationship.

In the backoffice, everything goes fine and I can add/update a consultant linking categories.

I added a frontend plugin to be able to add/update a consultant from the backend.

In the partial FormFields, I added the following lines because the categories where not present:
<f:for each="{categories}" as="category" iteration="categoriesIteration">
    <div class="my-profile-div-categorie">
        <label for="category_{category.uid}">
        {category.name}
    </label>
    <f:form.checkbox property="categories.{categoriesIteration.index}" id="category_{category.uid}" value="{category.uid}" checked="{category.checked} == 'true'" />
        </div>
</f:for>
</div> 

I am doing a loop to display all available categories (it has been assigned in the controller).

When I submit the form, the relationship table is populated properly, but I get the following error:
Unknown column 'categories' in 'field list': UPDATE tx_consultantprofile_domain_model_consultant SET categories='1', tstamp='1389719883', sys_language_uid='0' WHERE uid='44'

Do you have an idea about how to solve my issue?

Many thanks



More information about the TYPO3-project-typo3v4mvc mailing list