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

Alerts Page Error #5156

Open
SychO9 opened this Issue Nov 20, 2018 · 4 comments

Comments

Projects
None yet
5 participants
@SychO9
Contributor

SychO9 commented Nov 20, 2018

Description

Type of error: Undefined
8: Undefined index: board
http://localhost/SMF21/index.php?action=profile;area=showalerts
C:/Apache24/htdocs/SMF21/Sources/Profile-Modify.php (Line 2325)

if (!isset($boards[$extra['board']]))
unset($alerts[$id_alert]);

I guess this appeared after the changes here #4834

Steps to reproduce

  1. Produce an alert not post related, like a buddy request
  2. Go to the other account, click Alerts (you see the alert but it isn't counted)
  3. Click All Alerts, Check your error log

Environment (complete as necessary)

  • Version/Git revision: latest
  • Database Type: MySQL
  • Database Version: 5.7.23
  • PHP Version: 7.1

@live627 live627 added this to the RC 2 milestone Nov 20, 2018

@jdarwood007

This comment has been minimized.

Member

jdarwood007 commented Nov 25, 2018

I haven't had time to test this but, does this resolve it?

Profile-Modify.php

-		if (!isset($boards[$extra['board']]))
-			unset($alerts[$id_alert]);		
+		if (isset($extra['board']) && !!isset($boards[$extra['board']]))
+			unset($alerts[$id_alert]);
@SychO9

This comment has been minimized.

Contributor

SychO9 commented Nov 26, 2018

Well, it fixes the error, but the alerts system is still very bugged, alerts related to posts don't work at all, and I get duplicate alerts, also the alert count isn't working

Perhaps a new issue about it 'd be better.

@smfbigguy

This comment has been minimized.

smfbigguy commented Nov 26, 2018

I was going to open an issue as per this thread:
https://www.simplemachines.org/community/index.php?topic=563540.0

but saw things were being worked on.

@smfbigguy

This comment has been minimized.

smfbigguy commented Nov 27, 2018

I should say. I implemented the code change from jdarwood and it made no difference. I was not getting errors for this before that, but thought it would fix alerts somewhere else in the code for me. I still run this change. (third post up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment