0

I have a few data tables on my site. If I login as the admin and go to the page where the view of the table is located, I can click Edit Item and change that one entry. However, I can't find how to add new or delete entries that are there.

When I'm looking at my data table screen I can see this:

TITLE         - NAME         - NUMBER OF ROWS
Example Title - Example Name - 41             - View

However, when I click View, it basically just refreshes the page and doesn't let me view the table. This happens for all my tables. If I'm at the Data Table Management page, I can do everything that is listed there (edit the table itself, claim/disown, schema, etc), but there's no option on this page to edit the data in the table. It says I should be able to do that from the Data Table Content Page. I realize I can edit these entries directly from the database, but the hope is to give an admin user of the website the ability to manage this data table without giving them access to directly edit the database itself.

Any suggestions or possible alternative solutions that I could use?

4
  • What exactly do you mean with "data tables", is it just an HTML table (with the typical td, tr, etc tags? Are you using the "datatables" module? Why you say "view", do you mean "produced by the views module"? And what do you mean by "click edit", how did you implement that feature? Sorry for so much questions-about-the-questions, but depending on your answers, I might have a possible answer ... Commented Dec 11, 2015 at 19:41
  • So this is semi-problematic as I didn't build the original site. It is not an HTML table, it is a view that is built from information stored in the database on a specific table. It looks like the modules Data, Data Admin UI, Data Entity, and Data Search are being used. I do not see a View that is built for this but it may be automatically building it. There is a shortcut added to the admin bar admin/content/data/entity/[name of data table]/42?destination=admin/structure/views/nojs/preview/[name of data table]/page_1 that takes me to editing that specific data entity.
    – Dan
    Commented Dec 11, 2015 at 19:59
  • thanks for demistifying it a bit. Would you be interested in an answer that might potentially replace your semi-problematic part of your site entirely? By using another (just 1) contributed module that will pretty sure allow you to replace all that magic, which is well documented, and for sure will make it pretty easy to "edit"the data in any of these rows also. If you're iinterested, please add a relevant note or something to your question about such possible alternatives. Doing so will avoid that my answer would get deleted via moderation (like "that was not the question"). Commented Dec 11, 2015 at 20:06
  • Sure Pierre. I was hoping there was a simple fix for this, as I know I could also just make a content type and a view out of it, but if there is a simple module that would do this that would be great too :)
    – Dan
    Commented Dec 14, 2015 at 14:45

1 Answer 1

0

The data table must be marked as a Drupal Entity -- then the columns of the table may make use of the Field UI to allow an edit page per entry similar to a node_edit form.

Otherwise, you may be able to use the Editable Views module to make a table redition of your Data table -- whose cells are editable values. In this case you will likely still need to make the whole table a drupal entity.

The Data module is an API module to adopt/destroy SQL tables into Drupal. It's not really designed as a phpmyadmin replacement for a site.

4
  • How would I go about marking it as an entity?
    – Dan
    Commented Nov 17, 2015 at 21:04
  • Enable the data_entity module. a Submodule to the Data module. Then every row in the table is created as a Drupal Entity.
    – tenken
    Commented Nov 17, 2015 at 21:39
  • Okay, the Data Entity module was already enabled and had the Administrator set to be able to edit data in all of the tables listed. Where do I go from there?
    – Dan
    Commented Nov 18, 2015 at 15:37
  • The tables have already been defined as entity types as well.
    – Dan
    Commented Nov 18, 2015 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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