Hi

I'm using Drupal 10.

I added a custom table to my database and then added the "View Custom Table" module to allow me to add to views.

Going to the "Add Custom Table" tab in views, I enter the name of the table, but it can't find the table.

As fas as I can tell it is set up properly with a primary key etc

Is there a step I am missing?

Thanks

Comments

Michael Parry created an issue. See original summary.

joseph.olstad’s picture

Version: 2.0.5 » 2.0.6

You might want to try version 2.0.6

also, it's good to read the README.md

https://git.drupalcode.org/project/view_custom_table/-/blob/2.0.x/README.md

VIEWS CUSTOM TABLE

CONTENTS OF THIS FILE

  1. Introduction
  2. Requirements
  3. Installation
  4. Configuration

INTRODUCTION

The Views Custom Table module gives the functionality to integrate your custom
table to views. So you can use strong features of the views for your custom
table. This module use hook_view_data() to implement functionality.

For a full description of the module, visit the project page:
https://www.drupal.org/project/view_custom_table

To submit bug reports and feature suggestions, or to track changes:
https://www.drupal.org/project/issues/view_custom_table

REQUIREMENTS

This module requires the following modules:

Views (Drupal Core)
Views UI (Drupal Core)

INSTALLATION

Install as you would normally install a contributed Drupal module. Visit:
https://www.drupal.org/docs/extending-drupal/installing-modules
for further information.

CONFIGURATION

Configure user permissions in Administration » People » Permissions:

Add custom table in views

  • Give user access to add his custom table to the system.

Administer all custom table in views

  • Give user access to administer all the custom tables, added by all the users

Administer own custom table in views

  • Give user access to administer own custom tables

Manage custom tables in Administration » Structure » Views » View CustomTable menu.

Alternately, there's instructions on the project page:

How to use:

  1. Download and extract files in module folder.
  2. Enable module from module list
  3. Go to Home » Administration » Structure » Views » View Custom Table
  4. Add your custom table in system using "Add Custom Table" link
  5. Add Relationship with drupal entities if any, otherwise leave none.
  6. Clear drupal cache
  7. Add a new view and you will see your custom table name in "Show" drop-down field.
joseph.olstad’s picture

Status: Active » Postponed (maintainer needs more info)