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

TheoRichel created an issue. See original summary.

joachim’s picture

The '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.

theorichel’s picture

I understand, thanks. But still, why is that form empty?

theorichel’s picture

I 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.

theorichel’s picture

So 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.

theorichel’s picture

Just 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).

joachim’s picture

Category: Support request » Bug report

Looks like some aspects of your table are not being properly declared.

theorichel’s picture

It'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.

joachim’s picture

Category: Bug report » Support request
Status: Active » Fixed

Great! Thanks for reporting back.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.