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?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | fix-broken-handler-1480656-4-D7.patch | 805 bytes | szt |
| #4 | fix-broken-handler-1480656-4-D7.patch | 739 bytes | szt |
| #1 | simplenews-views_activated_filter.patch | 1000 bytes | sjovanig |
Comments
Comment #1
sjovanig commentedThis 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.
Comment #2
flightrisk commentedThe 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.
Comment #3
simon georges commentedIs there a difference between Views 2.x and Views 3.x regarding that peculiar point?
With which version of Views did you have problems?
Comment #4
szt commentedRTBC #1 for D6 with Views3, and here is the patch for D7.
Please test it.
Comment #6
szt commentedSorry, wrong folder... Here is the corrected one.
Comment #7
szt commentedComment #8
berdirThanks, commited to all branches.
Comment #9.0
(not verified) commentedadded my views version