PDA

View Full Version : Warning Bug - 3.4.6


Blootix
26 Apr 2005, 05:32
When trying to warn somebody non-post-related, it comes with this error:This Warning Type does not allow you to issue an Alert. Taking You Back To The Post.

Screenshot attatched.

sv1cec
26 Apr 2005, 07:55
Please download the latest version and upgrade. It's easy.

Let me know if your problem is corrected.

Rgds

Exitilus
31 May 2005, 01:16
I'm having the same problem. But I've just upgraded to the newest version ... and I've verified all my files seem to be correct O.o

Also in Admin CP under View Warns by Warner. It shows My Top Administrator and My Supermoderators. But we have a second category for Administrators called "Owners" And it doesn't show me or the other person in it.

Blootix
31 May 2005, 04:01
I'm having the same problem. But I've just upgraded to the newest version ... and I've verified all my files seem to be correct O.o

Also in Admin CP under View Warns by Warner. It shows My Top Administrator and My Supermoderators. But we have a second category for Administrators called "Owners" And it doesn't show me or the other person in it.
It works fine for me.

sv1cec
31 May 2005, 06:34
I'm having the same problem. But I've just upgraded to the newest version ... and I've verified all my files seem to be correct O.o

Also in Admin CP under View Warns by Warner. It shows My Top Administrator and My Supermoderators. But we have a second category for Administrators called "Owners" And it doesn't show me or the other person in it.
Have you added the additional group into the administrators groups?

Mr. Brian
31 May 2005, 13:49
Have you added the additional group into the administrators groups?
What do you mean by "Have you added the additional group into the administrators groups"?

Also, where are those "warning column" located? How come I just couldn't see any of it? Hope you can clear my doubt. Thanks.

sv1cec
31 May 2005, 14:06
In AdminCP/Warning System/Manage Warning Options you can specify which groups your administrators belong to, if you are using more than one groups for the admins.

Also, which "Warning column" are you talking about?

Mr. Brian
31 May 2005, 14:44
How am i supposed to give out warnning(s) to my members? I just couldn't see any link other then through my admincp.

Even though I tried giving out warning through my admincp but it lead me to an error page say that I may not issue any warnings/alerts which are not related to a post. (But the fact is that I've selected YES for the both option in the setting).

Any help are much appreciated.

sv1cec
31 May 2005, 14:56
First things first. Go to AdminCP/Warning System/Manage Warning Options and make sure that you have set these according to your wishes. Make sure that when you click the button, the options are saved. If they are not saved, then you have other problems.

Post-related warnings are issued via postbit. In other words, when you look in the various posts in a thread, you should see above each post the links or buttons, which allow you to issue the warnings, they look like "Warn XYZ" or "View XYZ's warnings".

Non-post related warnings are issued from the User Public Profile page. Go into a thread, and click on the name of a user who has entered a post. Select View Public Profile. Make sure you are using a simple user for the test, and that you are either an admin or a moderator. If everything is OK, on the top of the user profile table, there should be the same links "Warn XYZ" and "View XYZ's warnings".

Also, non post-related warnings can be issued from the AdminCP/Warning System/Warn a User. Enter the user id or user name and when the user page appears, go to the bottom of it. There is a table saying "Warning Information". At the bottom of the table there is a button/link to warn the user.

Let me know if your Options get saved and if you see all these buttons/links.

Rgds

Exitilus
31 May 2005, 18:59
Have you added the additional group into the administrators groups?

Yup .. I put 6|14 in there.

How about the issue with Non-Post related warnings? any idea what that might be?

sv1cec
31 May 2005, 20:41
Exitilus, have you defined any warning types? And have you specified which one of them are non-post related?

Rgds

Exitilus
31 May 2005, 23:37
Aye. I created a Warning Called Bot. With 5 Warning Points (Which is the # set to Ban a User) and set Perma Ban to Yes

I set the Alert to NO. Even if I Disable Alerts. It still won't work and gives the same error message :|

sv1cec
01 Jun 2005, 06:11
I am not sure what to tell you. This error is coming from the hack files, not the ones of vB that you have edited, so it appears that either (a) something is wrong with the file or (b) something is wrong with your settings. If you want, give me access to your system and I'll try to figure it out (if it is not too well hidden).

To be on the safe side, please upgrade to the latest version.

Rgds

zell_11
04 Jun 2005, 10:22
I am getting the exact same problem

sv1cec
04 Jun 2005, 14:18
Please be a little more specific. What problem? And which version of AWS are you currently running? If you are not running the latest, please upgrade to the latest version first and then see if the problem persists.

Rgds

kmike
07 Jun 2005, 09:02
Well, I see that the handling of alerts in the code is very prone to errors. It's in fact so broken that I don't even know how to start fixing it. I just put some bandaid hacks which disabled alerts altogether for us, as we don't need them.

First of all, the "alert" hidden form field in WarnUserNoPost and WarnUser forms (warn_addwarn and warn_addwarn_nopost templates) is never initialized at all, if alerts are disabled. It is supposed to be set to $_GET['alert'], but if alerts are disabled, no &alert=... parameter is being passed in URL to the forms, so "alert" form field stays empty.

So following the chain of events, this causes $alert global variable to be always empty in Warn.php script, in DoWarnUser and DoWarnUserNoPost sections. This in turn sets "if ($alert=='No')" condition in warn_calculations() function to true ($alert is empty, so it's not equal to "No"), and the execution of the script follows completely wrong code path from here, causing that bogus "This Warning Type does not allow you to issue an Alert." error.

All checks for $alert=='No' which are sprinkled all over the code are susceptible to this, too.
Part of the problem is an initial extremely bad database design decision - instead of using integer for a flag type db fields (alert, ban, etc), these fields are strings, and defaults to NULL, so in fact they could be in the 3 states: "Yes", "No" and NULL (or empty). This causes many problems and greatly encumbers the code as checks for empty values should be added everywhere.

sv1cec
07 Jun 2005, 09:35
First of all, the "alert" hidden form field in WarnUserNoPost and WarnUser forms (warn_addwarn and warn_addwarn_nopost templates) is never initialized at all, if alerts are disabled. It is supposed to be set to $_GET['alert'], but if alerts are disabled, no &alert=... parameter is being passed in URL to the forms, so "alert" form field stays empty.

Not quite, it was initialized in WarnUser, not in WarnUserNoPost. I forgot that.

So following the chain of events, this causes $alert global variable to be always empty in Warn.php script, in DoWarnUser and DoWarnUserNoPost sections.

Again, not quite, it is checked in DoWarnUser, but it was not checked in DoWarnUserNoPost. Fixed that too.

This causes many problems and greatly encumbers the code as checks for empty values should be added everywhere.

Perhaps you are right on that, maybe I should have used an integer, instead of a string. I also added checks for empty values wherever $alert is evaluated.

Sorry for the mistakes folks, not intentional.

Just download the new version (3.4.12) and upload the zip files to your server.

kmike
07 Jun 2005, 10:02
Perhaps you are right on that, maybe I should have used an integer, instead of a string. I also added checks for empty values wherever $alert is evaluated.


Wouldn't it better to replace all $alert=='No' checks with $alert!='Yes' ?
That would cover both 'No' and empty values, as they're the same for the code logic.

sv1cec
07 Jun 2005, 10:04
Yes, it would, but I need time to change the code. I wanted to bring out a release which would fix the errors the users encountered. I plan to do a code-maintenance release in the next few days, where several areas of the code will be improved. If you have any other comments, I would appreciate if you could let me know.

Rgds