V6.5.3 : Welcome message
Hello,
we are trying to modify the default welcome message on our production server (we don't have the problem on test environment):
We can create a new welcome message, but it can be associated with only 1 domain:
CNIL welcome message assigned to domain1:
CNIL welcome message assigned to domain 2:
When we come back to domain1, the CNIL welcome message is not assigned anymore:
We would like to have only one default welcome message, but it is locked.
Thank you for your help, Best regards
Hello @PhidarkMM,
Thank you for the detailed report. You are describing two different problems.
1. "Invalid number of keys" when editing a welcome message
When a welcome message is saved, LinShare checks that it contains exactly the supported languages (English, French, Vietnamese, Russian). An old upgrade script, from LinShare 2.3, was supposed to add the Russian text to existing welcome messages, but it was never actually run. A server that was first installed before 2.3 and then upgraded can therefore have welcome messages with only 3 languages. A newly installed server has all 4, which would explain why your test environment works.
Could you run this query on your production database and send us the result?
SELECT wm.uuid, wm.name, array_agg(e.lang ORDER BY e.lang) AS languages
FROM welcome_messages wm
JOIN welcome_messages_entry e ON e.welcome_messages_id = wm.id
GROUP BY wm.uuid, wm.name;
If ru is missing from some messages, you can work around it this way (after a database backup):
SELECT update_wm();
This function was created by the 2.3 upgrade script and should still be in your database. It adds the missing Russian text to every welcome message. After that, you should be able to edit the messages again, the default one included. We will also add a proper fix in an upcoming release.
2. A custom welcome message can only be assigned to one domain
This is a bug: assigning a welcome message to a domain removes it from the other domains that were using it. We have opened an internal ticket and will fix it in a 6.5.x maintenance release. Until then, the only workaround is to create one copy of the message per domain.
About the default message being locked
The default welcome message belongs to the root domain, so only the super administrator can edit it. Once problem 1 is fixed, editing it as super administrator should work.
The workaround, pending the resolution of problem 2, would be to create an identical welcome message for each domain and assign it on a per-domain basis.
Regards, Fabien
Hello @fabienmoyon,
1. "Invalid number of keys" when editing a welcome message uuid | name | languages --------------------------------------+-------------+--------------- 05d60620-6648-4868-a690-8d96eb430a2b | CNIL | {en,fr,ru,vi} 4bc57114-c8c9-11e4-a859-37b5db95d856 | WelcomeName | {en,fr,vi}
SELECT update_wm(); update_wm
(1 row)
SELECT wm.uuid, wm.name, array_agg(e.lang ORDER BY e.lang) AS languages FROM welcome_messages wm JOIN welcome_messages_entry e ON e.welcome_messages_id = wm.id GROUP BY wm.uuid, wm.name; uuid | name | languages --------------------------------------+-------------+--------------- 05d60620-6648-4868-a690-8d96eb430a2b | CNIL | {en,fr,ru,vi} 4bc57114-c8c9-11e4-a859-37b5db95d856 | WelcomeName | {en,fr,ru,vi} (2 rows)
With this update we were able to modify the default Welcome message.
2. A custom welcome message can only be assigned to one domain We have deleted the custom Welcome message to have an unified one
Best regards, Philippe