Notifications->Mark All Read generates Ajax error

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Notifications->Mark All Read generates Ajax error

Post by junosapien »

Support Request Template
What version of phpBB are you using? phpBB 3.2.8
What is your board's URL? https://dev.sapien.com
Who do you host your board with? AWS
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? Yes
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.2.8
What MODs do you have installed? Author Reply Only
What extensions do you have installed? Add User, Codebox Plus, External Links Open in a New windw, Inline images in attachment, Posting Template, Quick Reply for Admins and Mods Only, Topic Age Warning
What styles do you currently have installed? Absolution
What language(s) is your board currently using? English
Which database type/version are you using? MariaDB
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Upgrade server from PHP 5.6 to PHP 7.2
Please describe your problem. Clicking on Notifications in the Menu bar and then clicking Mark All Read results in an Ajax Error: Service Unavailable error message. Other Ajax functions work properly (example purging cache in ACP). I have disabled all extensions and removed the MOD and the problem persists. The DB user designated in config.php has all privileges on the Database. Am open to more suggestions!
Generated by SRT Generator

User avatar
warmweer
Jr. Extension Validator
Posts: 4244
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Notifications->Mark All Read generates Ajax error

Post by warmweer »

junosapien wrote:
Thu Oct 17, 2019 7:35 pm
What version of phpBB3 did you update from? phpBB 3.2.8
That's probably a typo.
Is the style uptodate?
When I want to have a look at your site I get:
https://dev.sapien.com is requesting your username and password. The site says: “All Files”
Is that expected behaviour?
We should embrace problems, without which there wouldn't be any solutions.

User avatar
EA117
Registered User
Posts: 1377
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Notifications->Mark All Read generates Ajax error

Post by EA117 »

junosapien wrote:
Thu Oct 17, 2019 7:35 pm
Clicking on Notifications in the Menu bar and then clicking Mark All Read results in an Ajax Error: Service Unavailable error message.
You probably want to check and see what's in your PHP error log during this event. It sounds like you're hitting a status 500 response during the Ajax request; either from hitting an actual code problem, or by hitting a timeout because of the work PHP is being asked to do in response to "Mark all read".

But rather than try and guess or assume, the evidence being reported to the PHP error log should be examined, and follow where ever the evidence points. The PHP error log may be visible to you via FTP access as simply a file on your site; or it could instead be recorded as part of the web server error log or even the Linux system logs. Just depends on how PHP was installed and configured on this AWS-hosted server.

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

to WarmWear:
That's probably a typo.
Is the style uptodate?
When I want to have a look at your site I get:
https://dev.sapien.com is requesting your username and password. The site says: “All Files”
Is that expected behaviour?
Yes - a typo; we upgraded from 3.2.1
And yes - expected behaviour. Our DEV site is not open to the public.

to EA117
You probably want to check and see what's in your PHP error log during this event. It sounds like you're hitting a status 500 response during the Ajax request; either from hitting an actual code problem, or by hitting a timeout because of the work PHP is being asked to do in response to "Mark all read".

But rather than try and guess or assume, the evidence being reported to the PHP error log should be examined, and follow where ever the evidence points. The PHP error log may be visible to you via FTP access as simply a file on your site; or it could instead be recorded as part of the web server error log or even the Linux system logs. Just depends on how PHP was installed and configured on this AWS-hosted server.
There are no phpbb related errors in the php error log file. There are two related to different packages (Wordpress and OsTicket) that have been resolved.

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

Sorry forgot to address this
Is the style uptodate?
I have the latest version of Absolution. It DOES say it is compatible with 3.2.3. Do you think that could be the problem? I will post in the creators support forum as well.

User avatar
</Solidjeuh>
Registered User
Posts: 1780
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Notifications->Mark All Read generates Ajax error

Post by </Solidjeuh> »

You need to update the style to 3.2.8
Manual instructions are here: https://area51.phpbb.com/code-changes/3.2.3/?styles
Or contact the author.
Forum for NL Extension translations ---> https://www.supportforum.be
----------------------------------------------------------------------------

User avatar
warmweer
Jr. Extension Validator
Posts: 4244
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Notifications->Mark All Read generates Ajax error

Post by warmweer »

junosapien wrote:
Thu Oct 17, 2019 8:58 pm
Sorry forgot to address this
Is the style uptodate?
I have the latest version of Absolution. It DOES say it is compatible with 3.2.3. Do you think that could be the problem? I will post in the creators support forum as well.
Compatibility with 3.2.3 was probably tested, but with 3.2.8 it's almost certain that certain things will be missing, changed or new: so yes, it "could" be a problem (but there's no proof of that). You could try temporarily disabling Absolution and using prosilver only, perform the actions which causes the error and see what happens. (make sure you clear cache + your browser cache after changing a setting to make sure you're effectively testing the functionality with prosilver without any cached remnants of Absolution).

Also check whether your extension are uptodate (if Codebox plus = ABBC plus then that certainly isn't uptodate)
We should embrace problems, without which there wouldn't be any solutions.

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

Note: When I set the default style to ProSilver and deactivate Absolution style. I get the same error.

Also note that the same error occurs when I turn off all extensions (including CodeBox Plus).

User avatar
EA117
Registered User
Posts: 1377
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Notifications->Mark All Read generates Ajax error

Post by EA117 »

junosapien wrote:
Thu Oct 17, 2019 8:49 pm
There are no phpbb related errors in the php error log file. There are two related to different packages (Wordpress and OsTicket) that have been resolved.
My apologies, "service unavailable" was making me think this was the standard text for HTTP 500. I was incorrect, and HTTP 500 status is "Internal server error."

The HTTP 503 "Service Unavailable" status does happen to be intentionally returned by phpBB under several circumstances. You might want to check the ACP User Log just in case, but I'm not seeing that the event would have necessarily been revealed there.

One thing I might try is doing this same request without allowing it to be Ajax'd. e.g. When you have notifications pending, copy the link that is generated for "ucp.php?i=ucp_notifications&mode=notification_list&mark=all&token=xxxxx" and just invoke that URL from the address bar of your browser instead of actually clicking on the link. To see if you get a full 503 status page with any more data on it that way, versus just a generic/bare 503 response, versus actually seeing success at marking notifications read.

You could also try enabling/un-commenting the "define DEBUG" in your config.php, but I don't see for that case either that additional data would necessarily be revealed here.

Could you also perhaps confirm with a screen shot what your current 503 failure looks like? I seem to have issue with getting my board to Ajax that "mark all notifications read" response, and I'm out of time to continue playing with it try and figure out why my expectations are wrong. Maybe your screen shot will help clarify.

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

One thing I might try is doing this same request without allowing it to be Ajax'd. e.g. When you have notifications pending, copy the link that is generated for "ucp.php?i=ucp_notifications&mode=notification_list&mark=all&token=xxxxx" and just invoke that URL from the address bar of your browser instead of actually clicking on the link. To see if you get a full 503 status page with any more data on it that way, versus just a generic/bare 503 response, versus actually seeing success at marking notifications read.
Aha!
Screen Shot 2019-10-17 at 4.39.10 PM.png
This seems a bit more explicit.... investigating....

User avatar
EA117
Registered User
Posts: 1377
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Notifications->Mark All Read generates Ajax error

Post by EA117 »

The suggestion is that "ucp_notifications" is an inactive module, but I presume you're not having problems with other modes that use that module, such as viewing the list of notifications within the UCP. ("View All" link, or just going to the interactive UCP link and switching to notifications list view.)

Line 430 in ucp.php is a suspicious reference, because in phpBB 3.2.8 there isn't any line 430. As though additional custom code may have been added in that file.

Whether the additional code might have done it, or even an extension (which you already ruled out by disabling), maybe the module ID is being corrupted or overwritten to a disabled module in this "mark all read" case?

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

The suggestion is that "ucp_notifications" is an inactive module, but I presume you're not having problems with other modes that use that module, such as viewing the list of notifications within the UCP. ("View All" link, or just going to the interactive UCP link and switching to notifications list view.)
Clicking View all just takes me to my notifications preferences in the UCP. I don't appear to have a Notifications List View?
Line 430 in ucp.php is a suspicious reference, because in phpBB 3.2.8 there isn't any line 430. As though additional custom code may have been added in that file.
Yes - there are modifications to that file. However, I get the same error when the modifications are removed.
Screen Shot 2019-10-18 at 8.51.21 AM.png
Screen Shot 2019-10-18 at 8.51.21 AM.png (25.9 KiB) Viewed 415 times
Whether the additional code might have done it, or even an extension (which you already ruled out by disabling), maybe the module ID is being corrupted or overwritten to a disabled module in this "mark all read" case?
I suppose that is possible. I have noted on several other older posts (like this viewtopic.php?t=1185975) that others have suggested clearing and refilling the modules table. While this may be my answer I am afraid I do not trust the old offerings to cover all the modules that actually need to be added. Is there a list somewhere of what all the base modules are? There are currently 216 in my modules table.

User avatar
EA117
Registered User
Posts: 1377
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Notifications->Mark All Read generates Ajax error

Post by EA117 »

junosapien wrote:
Fri Oct 18, 2019 4:36 pm
I don't appear to have a Notifications List View?
Okay, then perhaps we don't need to be suspecting anything exotic, and perhaps the module simply is disabled. Yes, I was expecting you would be able to see a list of your recent notifications in the UCP, from a "Manage notifications" section of the "Overview" tab, which also invokes the same "i=ucp_notifications&mode=notification_list" module and mode as the "mark=all" link uses:

notification.png

So does your ACP modules display for User Control Panel happen to simply show this module ("Manage notification", under the "Overview" section) is configured to be disabled, similar to:

modules.png

If it is currently configured as disabled -- and you didn't intend for it to be, or didn't know that it was -- then perhaps all that is needed is to re-enable the module. Maybe someone else has an idea on what might have intentionally disabled this module without your knowledge; e.g. an extension that expected to provide a different way to manage this functionality, etc. There are no such reasons that I'm aware of, but that's not saying much.

If you did have this module intentionally disabled, then the issue here may be that the navigation bar template and/or template variables weren't accounting for the fact that this module is currently disabled. And were continuing to present you with the "Mark all read" link, even though it could not be invoked in the current configuration. Unlike the full interactive UCP display, which doesn't present the "Manage notifications" when this module is disabled.

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

OK. So this is really weird. Manage Notifications is not listed as a module in the ACP either. It was never intentionally disabled or removed. (And it works fine in production under php 5.6 and phpbb version 3.2.5)

Here is the screenshot from DEV (php 7.2 and phpbb 3.2.8)
Screen Shot 2019-10-18 at 11.59.34 AM.png
And here is the one from production (php 5.6 and phpbb 3.2.5)
Screen Shot 2019-10-18 at 12.03.12 PM.png
Any idea how I might go about adding it back in?

And - in case this is relevant, you can see the module listed in the modules table (on dev) and marked enabled here:
Screen Shot 2019-10-18 at 12.04.58 PM.png
I note that this module is in my production database, but NOT in the DEV database:
Screen Shot 2019-10-18 at 12.18.37 PM.png
Could that be the issue?

junosapien
Registered User
Posts: 43
Joined: Fri Jan 25, 2013 9:51 pm

Re: Notifications->Mark All Read generates Ajax error

Post by junosapien »

Ok. Wow. So - I went to ACP->System->User Control Panel and added the Manage Notifications back in. Now it works. Thanks so much for all the help. Not sure i would ever have figured that out on my own!

Post Reply

Return to “[3.2.x] Support Forum”