The statistics dosen't works with Simplenews 7.x-1.0-beta2.
Simplenews changed his mail objects and functions http://api.worldempire.ch/api/simplenews/includes%21simplenews.source.in...
Please Update your module on lines 149, 150, 151 with the follow
$category = $message['params']['simplenews_source']->getCategory();
$node = $message['params']['simplenews_source']->getNode();
$subscriber = $message['params']['simplenews_source']->getSubscriber();
if ($message['module'] == 'simplenews' && $category->format =='html') {
$nid = $node->nid;
$mail = $subscriber->mail;
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | simplenews-statistic-upgrade-1502736-8.patch | 69.53 KB | jjchinquist |
| #7 | statistics-1502736-7.patch | 69.63 KB | jjchinquist |
| #6 | simplenews_statistic-upgrade-1502736-6.patch | 69.63 KB | jjchinquist |
| #5 | simplenews_statistic-upgrade-1502736-5.patch | 69.63 KB | jjchinquist |
| #2 | simplenews_statistic-1502736-2.patch | 6.09 KB | jjchinquist |
Comments
Comment #1
jjchinquistLooking at this issue. I believe it is rather a problem in the mail_alter hook.
In simplenews.module::simplenews_confirmation_send() the $params['context'] variable appears to be set (confirming soon).
Simplenews calls drupal_mail.
Printing out the $message array that is sent to the function simplenews_statistics_mail_alter, the $message['params']['context'] is no longer present.
Any help is appreciated.
Comment #2
jjchinquistUnfortunately, to make the module work, some changes must be made to the simplenews base module.
Required is a successful patch at: http://drupal.org/node/1537102
Simplenews has changes structure significantly since the last time this module was written.
Multiple changes were required to be compatible with simplenews base module. This patch is a start, but is not complete.
There seems to be an additional error within the _simplenews_statistics_parse_links function. See the single quote error inside of preg_replace:
Comment #3
weseze commentedThe current 7.x dev code is untested and unsuported. The module will be rewritten properly for D7 soon.
Patching the current code is a bad idea since it is based on an outdated architecture.
Comment #4
jjchinquistI do understand, and would be interested in helping to get this up and running in the following days. Is there any documentation for the upgrade?
Comment #5
jjchinquistUploading a patch of changes from the current 7.x-1.x-dev.
This patch is actually a result of taking a fresh copy of the 6.x-3.x-dev, running it through coder and updating the syntax to 7.x. It has been manually tested. The test cases must be written and community testing is required.
Comment #6
jjchinquisttest patch
Comment #7
jjchinquistattempting to trigger testing of patch...
Comment #8
jjchinquistThis version does work on 1 website. The patch should be manually tested.
Only Views integration is remaining.
Comment #9
jjchinquistCross referencing http://drupal.org/node/1390184 and setting as a duplicate.
patches will be added in the other issue.