Since the $table data is available in views_get_handler, it would be easy for modules to define their own handlers to handle Missing/broken handlers.

All a module would have to do is add something like the following in hook_views_data()

$data[$table]['broken handlers'] = array(
    'field' => 'example_handler_field_broken',
  );

I have attached a patch.

Comments

Anonymous’s picture

Status: Active » Needs review
bojanz’s picture

What's the use case, though?
I always viewed that functionality as a debug message kind of thing...

Anonymous’s picture

StatusFileSize
new874 bytes

In particular with query backends, you might have a more specific debug message to offer the user.

For instance, in the SPARQL query backend, if your field breaks, it is because you have changed your query and that variable is no longer returned. It would be nice to have a message that gave the specific indication of what went wrong to the user. In the SPARQL Views case, I would also allow them to change the field name so that they can change the field name to reflect the new query variable.

I have attached a patch that makes this work more like regular field declarations.

merlinofchaos’s picture

Should this be based upon the table or based on the query backend, though? For your use case, it would be a lot easier for everyone if the query engine could specify the broken handler to use, right?

merlinofchaos’s picture

Status: Needs review » Postponed (maintainer needs more info)

Marking NMI -- please return to 'needs review' after answering #4.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

OP has not answered NMI request