When I click the Edit link in the view that comes with this module, the edit form opens but its fields are empty. On top of the page is a reference to the correct item number, but the url looks strange:
http://theorichel.nl/admin/content/data/entity/foodnews/1?destination=admin/content/data/view/foodnews
The part after the 1 (for the first record) seems wrong. I'd expect 1/edit or so, not ?destina....
Any suggestions what to do?
Comments
Comment #2
joachim commentedThe 'destination' query string is to tell the form submit handler to go to that URL afterwards. It won't be affecting the content of the form.
Comment #3
theorichel commentedI understand, thanks. But still, why is that form empty?
Comment #4
theorichel commentedI went to the database and changed the name of one of the fields to lower case. In Drupal I then got a notice that the schema had a problem and an offer to solve that. I did so and the notice disappeared, but I also got a notice pertaining to the field of which I had changed the case. :
Notice: Undefined index: kastnr in data_entity_entity_edit_form() (line 49 of /home/theorich/public_html/sites/all/modules/data/data_entity/data_entity.pages.inc).There were two changes: the edit form now did show the contents for that particular field, but strange enough the contents of that field are not shown anymore on the main view.
Comment #5
theorichel commentedSo I changed all the fieldnames (in the database) to lower case. In Drupal then I adjusted the schema (or let Data do that for me). I have disowned and readopted the database as well and cleared every cache I could find.
Now two of the fields in my View say 'missing handler' and show no content. The rest shows content. The two fields with missing handler are the field I use as entityid/primary key and the field for edit link. No idea what to do now.
Comment #6
theorichel commentedJust did update.php and got this:
Warning: Invalid argument supplied for foreach() in drupal_schema_field_types() (line 7204 of /home/theorich/public_html/includes/common.inc).
Warning: array_keys() expects parameter 1 to be array, null given in drupal_schema_fields_sql() (line 7224 of /home/theorich/public_html/includes/common.inc).
Comment #7
joachim commentedLooks like some aspects of your table are not being properly declared.
Comment #8
theorichel commentedIt's done! One field name had a typo. I corrected it in the database, disowned and readopted the whole thing, made it an entity again. No more errors and a functioning edit form. Wonderful.
Now to find out how I can add records.
Comment #9
joachim commentedGreat! Thanks for reporting back.