API page: http://api.drupal.org/api/views/views.api.php/function/hook_views_defaul...

Enter a descriptive title (above) relating to hook_views_default_views, then describe the problem you have found:

I believe the filename specified above is incorrect.

This hook should be placed in MODULENAME.views.inc and it will be auto-loaded. MODULENAME.views.inc must be in the directory specified by the 'path' key returned by MODULENAME_views_api(), or the same directory as the .module file, if 'path' is unspecified.

This should read:

This hook should be placed in MODULENAME.views_default.inc and it will be auto-loaded. MODULENAME.views_default.inc must be in the directory specified by the 'path' key returned by MODULENAME_views_api(), or the same directory as the .module file, if 'path' is unspecified.

See http://drupal.org/node/1849474 for description of problems encountered when the file is named MODULENAME.views.inc.

Comments

xano’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 7.x-dev » 7.x-3.x-dev
Component: documentation » Documentation
dawehner’s picture

Issue tags: +Novice

.

ivan zugec’s picture

Status: Active » Needs review
StatusFileSize
new857 bytes

The documentation on api.drupal.org gets generated from the documentation within the files.
I have created a patch which updates the documentation as requested.

mducharme’s picture

Is there a way that the community can test/review this to get it RTBC?

dawehner’s picture

Status: Needs review » Needs work

Thank you for working on that.

This changes the description of hook_views_data not hook_views_default_views. If you move that, this looks fine!

Ozzie’s picture

Status: Needs work » Needs review

This patch applies without error.

Ozzie’s picture

Status: Needs review » Needs work

Updating status

ivan zugec’s picture

Status: Needs work » Needs review
StatusFileSize
new994 bytes

Sorry about that, I have fixed up the patch and placed the documentation in the right area.

dawehner’s picture

Status: Needs review » Fixed

Perfect, thank your for fixing this! Committed and pushed to 7.x-3.x

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