OG ships with a 'group file library' default View. This View depends on fields and sorts from upload.module. If upload is not active in the install, i am seeing "notice: Undefined property: views_handler_field_broken::$definition in /Users/mw/htd/pr6og/sites/all/modules/views/includes/field.handlers.inc on line 126.". Would be nice if Views did not emit this error. The error happens pretty frequently (perhaps when the default views are scanned).

Comments

merlinofchaos’s picture

You should probably only advertise this as a default view if all requirements are active; even with the notices cleaned up, the view will still not work.

moshe weitzman’s picture

Title: NOTICE when needed module is not active » Add requirements check for default views like Views1
Category: bug » feature

Earl said he would work on this as time permits. We will add a new check for plugins as well.

merlinofchaos’s picture

Status: Active » Fixed

http://drupal.org/cvs?commit=128999

This won't catch validator and argument default plugins, which it probably should, but I consider those fairly low risk.

moshe weitzman’s picture

Thanks. I took a look at the diff. I'm not sure that throwing errors is really the right behavior for the use case I mentioned above (OG module). Each time the site rebuilds its Views these will be thrown? I was thinking of silently logging to watchdog.

merlinofchaos’s picture

Status: Fixed » Active

Actually this only happens on import. Hah! I did this wrong, didn't I? It's ok, it can be reconfigured to work both on import and for default views I think.

moshe weitzman’s picture

Category: feature » bug
Priority: Normal » Critical

I'd be sad to see us release without this so I bump to critical and mark as bug since it is a regression from D5. But feel free to demote as needed.

merlinofchaos’s picture

This still needs to be worked on, but it seemed not to be as straightforward as it was in Views 1.

merlinofchaos’s picture

Touching, just to bring this into the more recently active group. This still needs to be done, it is still a problem for modules containing views that will be broken if things they need do not exist.

Letharion’s picture

Assigned: Unassigned » merlinofchaos

@merlin
Since you didn't seem to object to moshe making this critical, I'm assigning to you as a reminder that it's important.

merlinofchaos’s picture

Assigned: merlinofchaos » Unassigned
Category: bug » task
Priority: Critical » Major

Interestingly, it hasn't *really* come up very much, other than for modules like og.

If someone wants to work on this, technically this is a major regression from Views 1, but it will require someone willing to write the patch to do this.

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)