I am trying to help out porting the webcomic.modue - issue.

I have moderate PHP knowledge, but my knowledge of Views API is next to nothing. I have been reading Views 1.x module developer API - and on the side, doing code walkthrough of the existing webcomic.module code that uses Views API.

I can across this code:

function webcomic_views_tables() {
  $tables['webcomic_content'] = array(
    'name' => 'webcomic_content',
    'provider' => 'internal', // won't show up in external list.
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid'
      ),
      'right' => array(
        'field' => 'nid'
      ),
    ),
	
...

  return $tables;
}

Can some one point me to the documentation where I can find out more about the 'provider' element in the $tables? Where can I find documentation for that? I did go through Views 1.x module developer API and could not find details about 'provider'.

Any help is appreciated.

Comments

pbarnett’s picture

I did a string search over my entire site codebase, and found that there were several places where this field was used, but it's always set to 'internal'.

Furthermore, the field doesn't seem to be accessed anywhere; it's just set.

so I can't figure out what it means given that it's set but never referenced...

The search result was :-

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/og_user_roles/og_user_roles.module line 635

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/og_user_roles/og_user_roles.module line 666

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/og_user_roles/og_user_roles.module line 690

'provider' => 'internal',
in file ./sites/all/modules/subscriptions/subscriptions.module line 1514

$table['provider'] = $provider;
in file ./sites/all/modules/views/views.module line 1086

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_book.inc line 12

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_book.inc line 40

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_comment.inc line 12

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_comment.inc line 93

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/views/modules/views_node.inc line 12

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_node.inc line 251

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/views/modules/views_statistics.inc line 12

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_taxonomy.inc line 39

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_taxonomy.inc line 86

'provider' => 'internal',
in file ./sites/all/modules/views/modules/views_taxonomy.inc line 100

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/views/modules/views_user.inc line 12

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/views/modules/views_user.inc line 63

'provider' => 'internal', // won't show up in external list.
in file ./sites/all/modules/views/modules/views_user.inc line 88

Vyoma’s picture

That looks pretty weird.

Who do we go to next? views.module developers?

Update: I did a search on the Views modules files - both the 5.x and 4.7.x versions. Could not find where it was used.

pbarnett’s picture

It's definitely never referenced in the code; I'd be tempted to set the damn thing to 'internal' and leave it at that... though I guess it wouldn't hurt to ask the module developers.

SOMEBODY must have put it there in the first place!

Pete.

Vyoma’s picture

I am having a hunch that this might be some legacy code leftovers.

Not sure though - me just a newbie to Views Module. :P

But if it turns out to be a legacy code now unused, we can remove that all together.
>< Lots of modules dependent on it would need to be updated though.

Vyoma’s picture

Issue #197816 created so that this can be tracked.

Pardon me if this is not the right practice.

Vyoma’s picture

... at the issue.

It's actually a feature that was never implemented, and at this point never will be. It is now completely superfluous. You are correct.

Leaving this active in the hopes that someone will take it upon themselves to write a patch to just remove it all.

pbarnett’s picture

Now we know!

Kudos to merlinofchaos for the prompt reply!

Pete.