Xen Notices [Deleted]

I am getting weird behaviors with this add-on as of late. When I save a notification - I can no longer change the text inside it.

The first time I try to save a new notification is gives me an invalid text error for the main body of the message. If i hit save again it works without the error (no changes required) but then if I try to edit the notification and change the text it reverts to the previous text. Any ideas? Not sure when this started happened but we just noticed it with the latest site revamp as we are not updating the notifications. I ended up deleting many of them and creating new ones because of this issue. :(

Running xenforo 1.2.4
 
I am getting weird behaviors with this add-on as of late. When I save a notification - I can no longer change the text inside it.

The first time I try to save a new notification is gives me an invalid text error for the main body of the message. If i hit save again it works without the error (no changes required) but then if I try to edit the notification and change the text it reverts to the previous text. Any ideas? Not sure when this started happened but we just noticed it with the latest site revamp as we are not updating the notifications. I ended up deleting many of them and creating new ones because of this issue. :(

Running xenforo 1.2.4
Are you using the rich text editor? If so, switch it off in the Notifications options in the ACP. It's not been updated to work with Redactor (the Xenforo editor since 1.2) and some have had problems with the old editor. I switched it off and use plain text and HTML and it works just fine.

Hopefully @Chris D will update this at some point though he has been busy with Xen Media Gallery and the newly released Xen Pushover, both of which are awesome. :)
 
Are you using the rich text editor? If so, switch it off in the Notifications options in the ACP. It's not been updated to work with Redactor (the Xenforo editor since 1.2) and some have had problems with the old editor. I switched it off and use plain text and HTML and it works just fine.

Hopefully @Chris D will update this at some point though he has been busy with Xen Media Gallery and the newly released Xen Pushover, both of which are awesome. :)

Ah I am, excellent that makes sense. Thank you!
 
Chris D updated Notifications with a new update entry:

Fixes Rich Text Editor, Birthdays, Plus Performance Enhancements

Version 1.7 of Notifications brings with it a number of important fixes and performance enhancements.

They are:
  • New HTML rich text editor based on Redactor:
upload_2014-4-2_1-49-27.webp
  • Birthday notifications functionality has been fixed to ensure the correct users are displayed in the notification.
  • Birthday notifications are no longer based on the users being followed. Instead a new option lets you provide a limit on how many birthdays will be shown (0 to show all).
  • A lot of code improvements and refactoring.
  • Performance enhancements! Notifications now have zero query overhead. Dismissed notifications are cached in the user's session, and the notifications themselves are now cached in XenForo's simple cache.
You should receive an e-mail from FetchApp containing a new download link, however any e-mail you have received about Notifications previously contains a download link which will also download this latest version.

Read the rest of this update entry...
 
Last edited:
You can see the editor functions in the screenshot above, however, you can activate the code button (the one on the left) and that will let you type any HTML.

Of course, the notifications are typically quite small, so not everything is appropriate, but technically all HTML should work. The only exception to that is if you try and use any JavaScript heavy stuff inside a Notification. It may not work very well. That being said, a while ago I was able to create a notification by pasting in the code for a Facebook "Like" button. So it should be pretty flexible :)
 
Thanks for the update. :)

My site stopped loading (blank page) after uploading the new files. Got one of these errors for each time someone tried to visit.

Untitled.webp
 
Same problem but I thought it was because of Transmit (just started using it). Am in the process of restoring from a backup to be sure.

Now I'm getting a "An unexpected database error occurred. Please try again later."

Everything seems to be fine for me after deleting all the add-on's files. Site is loading and server errors have stopped. Are you saying that you restored your site's database or the original add-on files?


Not compatible with 1.2.x - had to turn it off now because of errors :(
I'm using 1.3.
 
Last edited:
Everything seems to be fine for me after deleting all the add-on's files and the server errors have stopped. Are you saying that you restored your site's databases or the original addon files?



I'm using 1.3.

Oh - maybe im incorrect then.
 
Everything seems to be fine for me after deleting all the add-on's files. Site is loading and server errors have stopped. Are you saying that you restored your site's database or the original add-on files?
I have a habit of backing up my full forum structure and DB before I do some upgrades (that seem to be a major step), so yes, that's what I'm doing.
 
Thanks for the update. :)

My site stopped loading (blank page) after uploading the new files. Got one of these errors for each time someone tried to visit.

View attachment 70852
Same problem but I thought it was because of Transmit (just started using it). Am in the process of restoring from a backup to be sure.
As ever, guys, the thing to do if you have add-on troubles is to put this in your config.php file:
PHP:
$config['enableListeners'] = false;

That should prevent any add-on listeners from running.

I am going to release 1.7.1 now. The cause for this error is because I have moved on to use XenForo event hints but until that event hint is applied (after the files have been uploaded but before the XML has been imported) there's a chance that the Account controller could execute several times per page load thus the "cannot redeclare" errors.

The 1.7.1 files will prevent this.

Also, the add-on should work fine on XenForo 1.2, but the installer checks for the wrong version number. This fixes the installer too.
 
I'm using Xenforo 1.3 and as soon as I uploaded the files to my test site (I hadn't disabled the add-on, though didn't see any instructions to do so) both my site front end admin panel returned blank pages when I visited them. As soon as I replaced the files with the older version 1.62, both site front end and admin panel returned. There were 12 errors logged in the ACP:

Code:
ErrorException: Fatal Error: Cannot redeclare class XFCP_GritterNotifications_ControllerPublic_Account - library/XenForo/Application.php(514) : eval()'d code:1
Generated By: Unknown Account, 2 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(44) "http://www.site.com/admin.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

BTW Chris, I noticed there were several .DS Store files in the package - unrelated to this of course but you may want to remove them to keep it clean?
 
Back
Top Bottom