Clean docker-compose with 14.10.1: “Unknown macro: notifications.” in profile page


So I’m having troubles with version 14.10.1.
Whenever I start a whole new instance of my simple docker-compose with image 14.10.1 (mysql-tomcat variant) I’m getting a “The [notifications] macro is not in the list of registered macros. Verify the spelling or contact your administrator.” in the " My Activity Stream" on the admin profile.

I’ve checked the forum and found someone downloaded and installed the xar again? that didn’t work for me as it says the page has errors?
Screenshot from 2022-12-19 11-24-14

It looks like it’s just non-existent:
(had a screenshot here but I’m not allowed to post more…)

I’ve tried numerous times reinstalling, which always gives me this problem.
I’ve tried upping mysql server (now using 5.7.40), still the same problem.
I see a lot of this coming through the logs:

xwiki-web_1  | Caused by: java.sql.SQLException: Incorrect string value: '\xE2\x80\x8B__H...' for column 'XWD_CONTENT' at row 1
xwiki-web_1  | 	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
xwiki-web_1  | 	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
xwiki-web_1  | 	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(
xwiki-web_1  | 	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(
xwiki-web_1  | 	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(
xwiki-web_1  | 	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(
xwiki-web_1  | 	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(
xwiki-web_1  | 	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(
xwiki-web_1  | 	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(
xwiki-web_1  | 	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(
xwiki-web_1  | 	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(
xwiki-web_1  | 	... 106 common frames omitted

Is this a red herring or could this be the problem?
How do I go about debugging and fixing this problem?


So I just fixed this myself…
This is indeed a problem with not using utf8mb4 as a character set in your mysql.
To make this work in a docker(-compose), you’ll need to replace the startup:

command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']

I know without having utf8mb4 used to work (probably a release from a year, maybe 2, ago) as I have one running with an older xwiki (which needs upgrading for security reasons).

I can’t find anything about this as a ‘minimum requirement’, is there any documentation on this?

We need to improve the documentation I think. At xwiki-docker/ at master · xwiki/xwiki-docker · GitHub it says:

  • Then run a container for the database and make sure it’s configured to use an UTF8 encoding.

  • Then the examples for MySQL and MariaDB use utf8mb4 but don’t explcitly mentioned it’s needed
  • The example for PostgreSQL uses utf8

The doc at also doesn’t mandate utf8mb4.

My understanding is that XWiki should work fine with both utf8 and utf8mb4 (but if you use utf8 then you won’t have emojis).

So maybe we have broken support for utf8 by mistake?

@tmortagne any idea?


Hey vmassol,

Looking at the bug I don’t entirely think your understanding of ‘Xwiki working fine with utf8’ is true. Yes, for a plain installation without default skin it works (i’ve tested that as well) but as I can’t install one of the default extensions, the ‘My Activity Stream’, without having utf8mb4 I would say Xwiki doesn’t work fine without utf8mb4. If your understanding was true it should install without problems but, like you said, not support emojis which would be perfectly fine for me. (I’m sorry vmassol! I’ve read over your last sentence! Keeping this paragraph in here just as a reminder for myself)

The problem is that not having utf8mb4 (for mysql at least) breaks the default skin as the “My Activity Stream” just doesn’t install with a clean (docker) install and also post-installing the plugin just doesn’t work as it installs about 7 translations of the notifications macro but not the notifications macro itself, which it probably also does when installing the default skin!

In my eyes the whole installation of the default skin should fail when it has db-query errors, ESPECIALLY if it’s trying to insert or change something in there! It doesn’t do that at the moment, it installs the skin, throws a few small exceptions inline but after says it’s A-OK, which it clearly isn’t.

The same goes with post-installing the notifications plugin (or any plugin for that matter) as soon as the minimum requirement can’t be installed (i.e. XWiki.Notifications.Code.Macro.NotificationsMacro) it shouldn’t install the translations for it and it should actually just delete the installed translations for it and throw up an error about WHY it failed (which it doesn’t say in the frontend when installing extensions)

As I’m having troubles with xwiki on another system (CPU load suddenly surges to 100% and keeps it there, which makes xwiki get stackoverflows/out of memory errors), I’m now afraid it maybe has something to do with some upgrade I did where I didn’t see the inline error which made this mess.

To be a littlebit more specific about this:
I upgraded a 13.x.x (which worked perfeclty on utf8) to 14.10.0 which looked like it worked flawlessly it upgraded all the plugins… even the Notifications plugin, I thought, but it looks like it didn’t upgrade it because of my utf8 DB so it now, probably, uses some werid mixture of 13.x.x Notifications pages mixed in with 14.10.0 translations on it. It does seem to work, but it makes me think if more plugins have this problem at upgrading what kind of issues could arrise from it (like surging CPU loads and such as there is some compatibility issues, race conditions or unlimited threads spawning because of mismatches).

That’s the current theory, yes, but looks like someone recently added to one of the XWiki Standard pages a character which is not supported by utf8mb3. We need to see what this character is exactly and if we can/want to fix that or not. If we drop support for utf8mb3 then we need to introduce an automatic migration from utf8mb3 to utf8mb4.

Hey tmortagne,

I’ve seen the error come by multiple times when doing a fresh install on utf8mb3, so I’m not sure if it’s just one page.

My point is that it’s very recent and very few, since there are plenty of instances which are still using utf8mb3.

Anyway, the first thing to do is identifying them and either fix them if that’s possible (and IMO we really should for the LTS branch). Would be great if you could create a BUG issue on Loading... with the info you had gathered so far.

My point is that it’s very recent and very few, since there are plenty of instances which are still using utf8mb3.


I don’t have any of the info I’ve gathered except for what’s up here. But I’ll retrace the steps and make a bug report with that info. It’ll take a bit longer though, my apologies.

No problem. Thanks a lot for your efforts !

I’ve made a bug issue: Loading...

Marking this thread as solved now.

Thanks, I was expecting only a few errors but the log you provided is actually full of those and given the name of the documents involved I think I know what is the cause: it seems to be related to the recent huge Japanese contribution.

I was really not expecting utf8mb3 to be so bad that it did not even support (some ?) Japanese characters…

tbf I wouldn’t mind to leave most of the translations out of the package (if at all possible, mabe a feature request is in order for that?).

What stings the most, in my eyes, with this is that if you’re not paying attention when the xwiki tries to install the default skin you won’t notice the problems as it doesn’t mention anywhere that something has failed (except for the logs, which can be scrolled upwards and not noticable). It’ll even tell you everything is installed and you’re ok to move on… which just gives the wrong signals.

… haha! I told you from the start:


Well, this is true for Japanese translations if you don’t need them. Macros pages don’t contain translations, so there is no reason to have missing macros. There are different problems here.

I was just stating as a user the installation sends out conflicting messages:
“Oh look, XWiki installed the default flavor just fine, no errors, it even has ‘installed’ in green”
^scroll, scroll, scroll^ “Oh maybe it did have errors, why the f didn’t it tell me it had errors”

I’d be more happy with something like this:
Where it shows it had errors installing and maybe even make a new tab with errors where it can show ONLY the errors from the install log and if you want to continue with those errors it just ask ‘are you sure?’

The fun thing is, you could even make it work with “only translation errors, so it’s ok to continue”:
and you could click ‘continue’ without having a second question.

This is just more about UX than anything…

Sure, I agree. Now it might not always be easy to differentiate between the types of errors, especially when it’s the exact same cause, like here since right now at this level it’s all just wiki pages. What is easy to do at least is indicating that there was errors in the log (without any information on how blocker they are). Note that the best would probably be to create a new IMPROVEMENT (or IDEA) jira issue with your design ideas to make it more visible.

Agreed! I was looking at it from a user perspective, not from a programmings point.
I’ll make a few new tickets!

Thanks !

Hmm, strangely, I don’t seem to reproduce with MySQL server 8.0.31.

I tried to import in a utf8mb3_bin MySQL database and it went well.

What is strange to me in your first message is the fact that apparently 3 translations could not be imported in your case and not just Japanese, as if it was failing to save any utf8 characters and not just 4 bytes ones.

Are you sure you were not using something like latin1 ? You don’t seem to give many details about that actually, so I just assumed it was utf8 (so utf8mb3)

That’s… highly interesting…

I went back and checked and you’re entirely right! I never switched it to utf8mb3, I immediately switched it to utf8mb4 which obviously worked!
I assumed the default was utf8 which it obviously isn’t.

I’m such a dumbass, I’ll be over there in the corner now… drowning in my own tears…