1

I have a Content Type with a Field Collection that can have multiple entries. Whenever i click on "insert new element" i get instead a blank row with a "delete" button but no fields to fill. (site is in italian, Elimina means "Delete" and "Aggiungi un altro elemento" is the "add new item" button)

empty rows

Things worth mentioning:
1) This happens when i'm in the frontend template (the node can be edited by anonymous users) but not when i'm in the administration pages, it works fine there
2) This field collection has some special fields: 1 Simple Hierarchical select, 2 computed fields and 1 Geofield. Apart from the SHS field the other fields are not editable by users (and even if they were, those fields are automatically generated so there won't be a widget)
I have tried to change the SHS widget with other widgets but it didn't work.
3) There are other field collections in this content type and adding a new item there works fine and shows me the form
4) I have checked through Firebug the json returned by the ajax call used to add a new item and it contains the HTML for the new form, but it looks like it's not appended to the page
5) Another thing that may be an issue is that on the frontend i'm using jquery 1.9 while in the administration pages i'm using jquery 1.7 (the site uses a bootstrap template) and i have noticed that in the ajax response it says jquery_version: 1.7, but this won't explain why other fields work.
6) i have tried changing the fields order putting the fields that work over this one but that didn't work either. Those field collections that worked kept working and this one that doesn't work was still not working

  • are you using field permissions or other similar module? if admin can but anonymous can not, it usually means a permissions problem somewhere... – Geoff Dec 21 '14 at 20:33
  • You are right. I have discovered that even though the permissions on the field collection itself were public, the permissions on the fields inside allowed anonymous users to edit existing items but not create new items so that gave me an empty form when creating a new item of that field collection. – valepu Dec 22 '14 at 3:35
0

At first i thought it was a javascript problem or something like that but as Geoff pointed out it was a permissions problem:

The permissions on the field collection itself were public, the permissions on the fields inside allowed anonymous users to edit existing items but not create new values for those fields so that gave me an empty form when creating a new item of that field collection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.