I got this error, so downloaded and installed the latest beta version of simplenews. The error remained. I cannot create a view using the views module using simplenews fields. I want to create a simple report that lists all the active users who are NOT subscribed to the newsletter. I create a view of "users". When I try to add a filter and select simplenews subscriber:activated, I get the following error:

"The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item."

I am using the Feb 23 views update. Could it be something that changed in views that broke simplenews or just a bug in simplenews?

Comments

sjovanig’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1000 bytes

This bug is reproducible in 6.x-2.x branch too. I attach patch to fix this in 6.x, I think patch is applicable to 7.x, but I did not test it.

flightrisk’s picture

The drupal 7 code is different from the drupal 6 code, or at least the line numbers are pretty far off. I wound up fixing this thanks to your help. Around line 345 I made my code for the views handler for the "active" field look like this:

'filter' => array(
// 'handler' => 'views_handler_filter_boolean', -old code
// 'allow empty' => TRUE, -old code
'handler' => 'views_handler_filter_boolean_operator',
'label' => t('Activated'),
'type' => 'yes-no',
'accept null' => TRUE,
),

I had to flush the cache before it would recognize the change and stop giving me an error. To get my view of a list of users who were not subscribed to the newsletter, I could then create a new view and select type "users". In the filter for the view, I then used the field "simplenews subscriber: activated" and clicked the "no" checkbox. This will select the users who do not have the checkbox checked to receive that newsletter. After that, it is a simple task to get the fields I need in the report like the users name, email, etc.

So far this seems to work great. I would suggest this patch get further testing and then get committed.

simon georges’s picture

Is there a difference between Views 2.x and Views 3.x regarding that peculiar point?
With which version of Views did you have problems?

szt’s picture

Version: 6.x-2.x-dev » 7.x-1.0-rc1
StatusFileSize
new739 bytes

RTBC #1 for D6 with Views3, and here is the patch for D7.
Please test it.

Status: Needs review » Needs work

The last submitted patch, fix-broken-handler-1480656-4-D7.patch, failed testing.

szt’s picture

StatusFileSize
new805 bytes

Sorry, wrong folder... Here is the corrected one.

szt’s picture

Status: Needs work » Needs review
berdir’s picture

Version: 7.x-1.0-rc1 » 7.x-2.x-dev
Status: Needs review » Fixed

Thanks, commited to all branches.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

added my views version