Fatal error: Cannot redeclare simplenews_uninstall() (previously declared in /home/.makadisa/nynjtc/westchester.nynjtc.org/sites/all/modules/simplenews/simplenews.install:151) in /home/.makadisa/nynjtc/westchester.nynjtc.org/sites/all/modules/simplenews_register/simplenews_register.install on line 9

CommentFileSizeAuthor
#17 simplenews_register.module.txt4.25 KBglass.dimly

Comments

moonray’s picture

Status: Active » Fixed

Ugh. Thanks for catching that.
If you rename simplenews_uninstall() to simplenews_register_uninstall() you should be fine. Putting up the fixed version.

yktdan’s picture

Fatal error: Call to undefined function _simplenews_get_vid() in /home/.makadisa/nynjtc/westchester.nynjtc.org/sites/all/modules/simplenews_register/simplenews_register.module on line 32

tried new version and get new error on going to simplenews the settings page.

moonray’s picture

Status: Fixed » Active

It seems they changed things between version 1.2 and 1.3 of simplenews. I'll have to make a conditional update depending on the version.

scedwar’s picture

subscribe

W0lvEriNE’s picture

Version: 5.x-1.0 » 5.x-1.1

I am using simplenews 5.x-1.3 and i am having the same error on line 32 as vkdan reported. Please advise how to remedy this problem. Does the dev version address this ?

Many thanks

moonray’s picture

The fix would be to add this at the top of simplenews_register.module

if (!function_exists('_simplenews_get_vid') {
  function _simplenews_get_vid() {
    return variable_get('simplenews_vid', '');
  }
}
moonray’s picture

Status: Active » Needs review

If someone could test the version in CVS (which basically just adds the above code), and let me know if it works as expected, it would be much appreciated. Once confirmed to be working correctly, I'll make a new release.

sutharsan’s picture

I did not test, but from reading the code #6 should solve the problem.

jase951’s picture

Replacing the 5.x.1.1 version of .module file with that in CVS. For me still did not work, the whole site went white and only deleting the module files recovered the site.

frosev’s picture

Looks like a missing ')' on the IF statment

if (!function_exists('_simplenews_get_vid')) {
  function _simplenews_get_vid() {
    return variable_get('simplenews_vid', '');
  }
}

that should be correct

moonray’s picture

Ugh. Good catch.
Fixed in CVS. Care to give it another shot?

jase951’s picture

Ok for me now. Thanks!

hansrossel’s picture

#10 works perfect for me. No more white pages and functionality as expected.

Please add this to the dev version (so more people can check), not everybody is as Drupal literate to check the issues and without this code the module does not function.

moonray’s picture

Status: Needs review » Reviewed & tested by the community
glass.dimly’s picture

Status: Reviewed & tested by the community » Active

Hey folks,

Just installed simplenews on register, the non-dev version, and when I go to simplenews settings I get:

Fatal error: Call to undefined function _simplenews_get_vid() in /home/centerg9/public_html/sites/all/modules/simplenews_register/simplenews_register.module on line 32

You'll notice that poster number two had the same error but the initial error that opened the issue was different.

Here's the info from my simplenews.info file:

Information added by drupal.org packaging script on 2008-05-10
version = "5.x-1.3"
project = "simplenews"
datestamp = "1210421712"

So I've re-opened the issue.

-jmjohn

glass.dimly’s picture

Same on 5.x-1.dev version.

-jmjohn

glass.dimly’s picture

StatusFileSize
new4.25 KB

Hey folks,

Turns out the new Simplenews had replaced the _simplenews_get_vid() function and just used a variable_get('simplenews_vid', '').

So I did a find and replace and the module works for me. This is my first patch and I didn't use cvs so that's why I just pasted the .module file.

This is a patch for the .dev version.

peace
jmjohn

marcoBauli’s picture

tested the module at #17 above here and works just fine (no errors, subscription works sweet).

It would be great to be able to add some custom introductory text over the subscription checkbox button so to tell users what they are actually subscribing to.

Otherwise great add-on, thank you!

moonray’s picture

Status: Active » Fixed

I mistakenly applied the fix to HEAD, not DRUPAL-5, which is why it never showed in teh dev version. Apologies for that. In the meantime I've created a new release: 1.2. Marking as fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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