Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when signing up for Mobile alerts #895

Closed
Nhorning opened this issue Oct 19, 2012 · 5 comments
Closed

Error when signing up for Mobile alerts #895

Nhorning opened this issue Oct 19, 2012 · 5 comments
Labels

Comments

@Nhorning
Copy link

Fatal error: Using $this when not in object context in /home/nepalmon/public_html/application/helpers/alert.php on line 34

When using the Alerts page to sign up for mobile alerts. Any advice?

@rjmackay
Copy link
Contributor

That doesn't look good. Can you add more information on how to reproduce this bug and what version of the software you were using?
https://wiki.ushahidi.com/display/WIKI/Report+a+bug

@rjmackay
Copy link
Contributor

Also - in this case its probably relevant to add what plugins you're using (especially for sending/receiving SMS)

@Nhorning
Copy link
Author

Right, sorry about that. Would you believe I used to be a software tester....

Ushahidi 2.5 But I had a very strange upgrade where I had to do a fresh install without using the installer, and manually create auth.php, config.php, and encryption.php

I believe this is happening in both Firefox and Chrome. I'm working from Ubuntu 11.10 so I don't know if it's happening in IE

To reporduce:

  • Enable Signing up for Mobile Alerts by Making sure Display Mobile Option is set to "True" in /Controllers/Alerts.php
  • Make sure SMS sync is selected as the SMS provider in Settings>SMS in the Ushahidi interface.
  • Navigate to the alerts page and attempt to sign up for an alert as a test.
  • Fatal error: Using $this when not in object context in /home/nepalmon/public_html/application/helpers/alert.php on line 34 will display on a white screen.

Note: manually modifying e-mail alert recipients in the database to be SMS alert recipients does not seem to result in Alerts being sent either. However, I don't think whether SMS alerts work can be properly tested on my deployment until this issue is resolved.

Installed plugins:

Add This: 0.1
Admin Map (High Performance) 2.0
Facebook Social 0.6 (slightly modified with a submitted pull request)
FrontlineSMS 0.5
Location Highlighter - Lite 1.0
SMSSync 0.8

Uninstalled but listed Plugins:

Clickatell 0.5
Enhanced Map 2.1
Heatmap 0.8
Ushahidi API Library 1.0
Sharing 0.1
Sharing 2.0
Time Span 1.1
Viddler 0.1

rjmackay added a commit that referenced this issue Oct 23, 2012
$this-> was being used in a static function. Changed to self::
@rjmackay
Copy link
Contributor

Look at the code its actually a fairly simple and obvious error. Still present in 2.6 sadly so you might need to patch manually.

@Nhorning
Copy link
Author

Yes, That would have been simple and obvious if I knew PHP. A few days ago when I started looking into this, I pretty much knew it was an error with that line, but had no idea what to do with it. I'll patch manually and see if this works. Next will be to see if the alerts actually go out. Thanks a bunch for this!

rjmackay added a commit to rjmackay/Ushahidi_Web that referenced this issue Oct 24, 2012
$this-> was being used in a static function. Changed to self::
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants