Error "Unknown macro: notifications" under "My Active Stream" on the user profile page

With a testing instance imported with production data, I am upgrading XWiki from v7.0.1 to v13.10.9.

After bringing up the new version, I noticed an error saying “Unknown macro: notifications” under the section “My Active Stream” in the context of “Log in as an admin user > left panel > User Index > choose any user from the User Directory > Profile of the user”.

The error has a more detailed message saying, The "notifications" macro is not in the list of registered macros. Verify the spelling or contact your administrator. but no exception trace.

I have seen some previous posts about similar issues, such as My activity history - “Unknown macro: notifications.”, and have verified the extension Notifications Macro installed with the current version. I also tried uninstalling and reinstalling the extension, but still no luck so far.

I will highly appreciate any hints or suggestions. And, if you need more information, please let me know with some brief instructions.

@1780yz You are facing an issue caused by the replacement of the Activity Stream application with the Notifications application, which happened in XWiki 10.9RC1. You have to get rid of the old plugin and make sure you have the new one. You can start from https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/11.1/#HBackwardCompatibilityandMigrationNotes.
BTW, you question duplicates 10.8.1 to 10.9 Notifications macro doesn't work, please read that discussion.

Hope it helps!

1 Like

The issue still exists, but we followed the hints and did some more tests, as follows:

The extension " Notifications Application" has dependencies, including

  • extension “Notifications Macro”, for where the macro error points to
  • extension “User Profile Application”, which provides the feature of the “Profile of user” webpage
  • and other extensions

I have installed the extensions with the current version; however, the progress shows multiple SQL errors similar to the example below. I am unsure whether the errors are critical, so I saved the progress messages into the text files attached below.

Error: 1366-22007: Incorrect string value: '\xD0\x92\xD0\xB8\xD0\xBA...' for column `xwiki`.`xwikidoc`.`XWD_CONTENT` at row 1
SQL Error: 1366, SQLState: 22007
(conn=15) Incorrect string value: '\xD0\x92\xD0\xB8\xD0\xBA...' for column `xwiki`.`xwikidoc`.`XWD_CONTENT` at row 1
(conn=15) Incorrect string value: '\xD0\x92\xD0\xB8\xD0\xBA...' for column `xwiki`.`xwikidoc`.`XWD_CONTENT` at row 1

The issue disappears after uninstalling the extension “User Profile Application” and “Notifications Application” depending on it, while it is OK to keep “Notifications Macro”. By doing this, the “Profile of user” reduces to a basic webpage of the user. This testing action cuts off necessary functionalities, not an acceptable solution or workaround.

More Details about the database:

For your reference, the database is MariaDB v10.9.2. About the table concerned with the errors above, please see the below definition, and notice the setting of ENGINE=InnoDB DEFAULT CHARSET=latin1.

Again, we are not sure if the database is the root cause. If not, we can post a separate question for the database issue after resolving the current issue.

CREATE TABLE `xwikidoc` (
  `XWD_ID` bigint(20) NOT NULL,
  `XWD_FULLNAME` varchar(768) NOT NULL,
  `XWD_NAME` varchar(768) NOT NULL,
  `XWD_TITLE` varchar(768) NOT NULL,
  `XWD_LANGUAGE` varchar(5) DEFAULT NULL,
  `XWD_DEFAULT_LANGUAGE` varchar(5) DEFAULT NULL,
  `XWD_TRANSLATION` int(11) NOT NULL,
  `XWD_DATE` datetime NOT NULL,
  `XWD_CONTENT_UPDATE_DATE` datetime NOT NULL,
  `XWD_CREATION_DATE` datetime NOT NULL,
  `XWD_AUTHOR` varchar(768) NOT NULL,
  `XWD_CONTENT_AUTHOR` varchar(768) NOT NULL,
  `XWD_CREATOR` varchar(768) NOT NULL,
  `XWD_WEB` varchar(768) NOT NULL,
  `XWD_CONTENT` longtext NOT NULL,
  `XWD_VERSION` varchar(255) NOT NULL,
  `XWD_CUSTOM_CLASS` varchar(768) NOT NULL,
  `XWD_PARENT` varchar(768) NOT NULL,
  `XWD_CLASS_XML` longtext DEFAULT NULL,
  `XWD_ELEMENTS` int(11) NOT NULL,
  `XWD_DEFAULT_TEMPLATE` varchar(768) NOT NULL,
  `XWD_VALIDATION_SCRIPT` varchar(768) NOT NULL,
  `XWD_COMMENT` varchar(1023) NOT NULL,
  `XWD_MINOREDIT` bit(1) NOT NULL,
  `XWD_SYNTAX_ID` varchar(50) DEFAULT NULL,
  `XWD_HIDDEN` bit(1) NOT NULL,
  PRIMARY KEY (`XWD_ID`),
  KEY `DOC_AUTHOR` (`XWD_AUTHOR`),
  KEY `DOC_NAME` (`XWD_NAME`),
  KEY `DOC_CREATION_DATE` (`XWD_CREATION_DATE`),
  KEY `DOC_CREATOR` (`XWD_CREATOR`),
  KEY `DOC_CONTENT_UPDATE_DATE` (`XWD_CONTENT_UPDATE_DATE`),
  KEY `DOC_SPACE` (`XWD_WEB`),
  KEY `DOC_TITLE` (`XWD_TITLE`),
  KEY `DOC_CONTENT_AUTHOR` (`XWD_CONTENT_AUTHOR`),
  KEY `DOC_DATE` (`XWD_DATE`),
  KEY `DOC_LANGUAGE` (`XWD_LANGUAGE`),
  KEY `DOC_FULLNAME` (`XWD_FULLNAME`),
  KEY `DOC_MINOREDIT` (`XWD_MINOREDIT`),
  KEY `DOC_HIDDEN` (`XWD_HIDDEN`),
  KEY `DOC_DEFAULT_LANGUAGE` (`XWD_DEFAULT_LANGUAGE`),
  KEY `xwd_parent` (`XWD_PARENT`(50)),
  KEY `xwd_class_xml` (`XWD_CLASS_XML`(20)),
  KEY `DOC_TRANSLATION` (`XWD_TRANSLATION`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

You need to use the utf8mb4 char set, take a look at the https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationMySQL/ and MariaDB Installation (XWiki.org) installation info.

1 Like

I am trying to change the character set by SQL commands like:

alter table `xwiki`.`activitystream_events`
convert to character set utf8mb4 collate 'utf8mb4_unicode_ci';

However, the above command got an error saying:

SQL Error [1118] [42000]: (conn=14) Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

For the concerned table in the legacy data, see its DDL in the attachment activitystream_events.sql.txt (1.8 KB).

Similar errors exist on other tables, and we are testing with MariaDB v10.3 and v10.9.

My Questions:

How do we resolve the issue? E.g. setting changes, changing the table DDL, etc.

What is the common practice for this type of database conversion? For example, would the new version of the Java project have an automatic after-upgrade migration to take care of it?

Thank you, @acotiuga, for your help and patience.