Hi
I'm using D5. Simplenews 1.4 and installed this module.
At the page admin/content/newsletters/settings/digest_settings a have got an error:

Fatal error: Call to undefined function _simplenews_get_vid() in /www/vhosts/notheft.ru/html/sites/all/modules/simplenews_digest/simplenews_digest.module on line 52

Comments

vladsavitsky’s picture

Ок. I have found solution here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/simplenews/...

So, find:

  foreach (taxonomy_get_tree(variable_get('simplenews_vid')) as $newsletter) {

and replace with:

  $vid=variable_get('simplenews_vid');
  foreach (taxonomy_get_tree($vid) as $newsletter) {
maui1’s picture

HI, I ran into this same error, and discovered your proposed solution. I tried the substitution you recommend ( at line 52 in the simplenews_digest.module file), but now come up with the following error:

warning: Missing argument 2 for variable_get(), called in /home/mpcollab/public_html/MPbeta1/sites/all/modules/simplenews_digest/simplenews_digest.module on line 52 and defined in /home/mpcollab/public_html/MPbeta1/includes/bootstrap.inc on line 412

Are there any other settings that the digest module is expecting such as taxonomy?? or could there be a typo in the code substitution you recommend?

I installed this on drupal 5.10 php5 with simplenews v1.5, could this be a problem with the v1.5 instead of v1.4 you responded to above??

vinayras’s picture

Replace

 $vid=variable_get('simplenews_vid');
  foreach (taxonomy_get_tree($vid) as $newsletter) {

with

 $vid=variable_get('simplenews_vid','');
  foreach (taxonomy_get_tree($vid) as $newsletter) {

variable_get('simplenews_vid', '') requires 2 parameters to be passed - first variable name, second default value. In our case we will pass null for default value.

This works.

Vinay
eDrupal.com - Indian Drupal Community

maui1’s picture

Hi Vinray, thanks so much, that fixed it.

andrewlevine’s picture

Status: Active » Closed (duplicate)

dupe of #294298

Steve Dondley’s picture

Status: Closed (duplicate) » Closed (fixed)