No Code Attached Yet Information Required
avatar spamzini
spamzini
5 Sep 2022

Steps to reproduce the issue

Hi,
i'v upgraded a CLEAN installation of joomla 4.2.0 to the last one 4.2.2.
I'v upgrade by the file upload (administrator/index.php?option=com_joomlaupdate&view=upload) and not by the automatic update because Aruba italian provider can't allow this way.
The check of the database by the internal function .../administrator/index.php?option=com_installer&view=database shows two errors of database:
One of this was the XXXX_mail_templates htmlbody has not MEDIUMTEXT character set.

Expected result

0 ERRORS

Actual result

2 ERRORS:

System information (as much as possible)

Additional comments

Hi,

**
I solved with this SQL command:

ALTER TABLE XXXX_mail_templates CHANGE htmlbody htmlbody MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;**

avatar spamzini spamzini - open - 5 Sep 2022
avatar spamzini spamzini - change - 5 Sep 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Sep 2022
avatar brianteeman
brianteeman - comment - 5 Sep 2022

i'v upgraded a CLEAN installation of joomla 4.2.0 to the last one 4.2.2.

That can not be 100% correct because a clean install of joomla 4.2.0 already has htmlbody MEDIUMTEXT `

avatar spamzini
spamzini - comment - 5 Sep 2022

Ok. I made a mistake about this.
When i update i generated this file in attachement.
T


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38687.

avatar spamzini
spamzini - comment - 5 Sep 2022

#
#Date: 2022-09-01 15:22:21 UTC
#Software: Joomla! 4.1.5 Stable [ Kuamini ] 21-June-2022 14:00 GMT

#Fields: datetime priority clientip category message
2022-09-01T15:22:21+00:00 INFO 87.5.111.111 update Inizio installazione della nuova versione.
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update Conclusione installazione.
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update Inizio degli aggiornamenti SQL.
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update La versione attuale del database (schema) è 4.1.3-2022-04-08.
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update Eseguita query dal file 4.2.0-2022-05-15. Testo query: CREATE TABLE IF NOT EXISTS #__user_mfa ( id int NOT NULL AUTO_INCREMENT, .
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update JInstaller: :Install: Errore SQL Unknown character set: 'utf8mb4'
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update Fine degli aggiornamenti SQL - INCOMPLETE.
2022-09-01T15:23:35+00:00 INFO 87.5.111.111 update Pulizia post installazione.
2022-09-01T15:23:36+00:00 INFO 87.5.111.111 update L'aggiornamento alla versione 4.2.1 è completato.
2022-09-04T09:55:03+00:00 INFO 87.5.111.111 update Inizio installazione della nuova versione.
2022-09-04T09:55:53+00:00 INFO 87.5.111.111 update Conclusione installazione.
2022-09-04T09:55:53+00:00 INFO 87.5.111.111 update Inizio degli aggiornamenti SQL.
2022-09-04T09:55:53+00:00 INFO 87.5.111.111 update La versione attuale del database (schema) è 4.2.1-2022-08-23.
2022-09-04T09:55:53+00:00 INFO 87.5.111.111 update Fine degli aggiornamenti SQL.
2022-09-04T09:55:53+00:00 INFO 87.5.111.111 update Eliminazione di file e cartelle rimosse.
2022-09-04T09:55:55+00:00 INFO 87.5.111.111 update Pulizia post installazione.
2022-09-04T09:55:55+00:00 INFO 87.5.111.111 update L'aggiornamento alla versione 4.2.2 è completato.
2022-09-05T08:05:04+00:00 INFO 87.5.111.111 update Inizio installazione della nuova versione.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38687.

avatar brianteeman
brianteeman - comment - 5 Sep 2022

well that clearly shows you were updating from 4.1.5 and not 4.2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38687.

avatar spamzini
spamzini - comment - 5 Sep 2022

This is the query of 4.2.0-2022-05-15.sql inside the zip packet of update: \Joomla_4.2.2-Stable-Update_Package\administrator\components\com_admin\sql\updates\postgresql

I have two error:

  1. table _user_mfa was not created because Error SQL Unknown character set: 'utf8mb4' Who set the character set?
  2. _mail_templates htmlbody has not MEDIUMTEXT character set. I saw in the db and the char set was TEXT.

Content of the file: 4.2.0-2022-05-15.sql

--
-- Create the new table for MFA

CREATE TABLE IF NOT EXISTS "#__user_mfa" (
"id" serial NOT NULL,
"user_id" bigint NOT NULL,
"title" varchar(255) DEFAULT '' NOT NULL,
"method" varchar(100) NOT NULL,
"default" smallint DEFAULT 0 NOT NULL,
"options" text NOT NULL,
"created_on" timestamp without time zone NOT NULL,
"last_used" timestamp without time zone,
PRIMARY KEY ("id")
);

CREATE INDEX "#__user_mfa_idx_user_id" ON "#__user_mfa" ("user_id") /** CAN FAIL **/;

COMMENT ON TABLE "#__user_mfa" IS 'Multi-factor Authentication settings';

--
-- Remove obsolete postinstallation message

DELETE FROM "#__postinstall_messages" WHERE "condition_file" = 'site://plugins/twofactorauth/totp/postinstall/actions.php';

--
-- Add new MFA plugins

INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
(0, 'plg_multifactorauth_totp', 'plugin', 'totp', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 1, 0),
(0, 'plg_multifactorauth_yubikey', 'plugin', 'yubikey', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 2, 0),
(0, 'plg_multifactorauth_webauthn', 'plugin', 'webauthn', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 3, 0),
(0, 'plg_multifactorauth_email', 'plugin', 'email', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 4, 0),
(0, 'plg_multifactorauth_fixed', 'plugin', 'fixed', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 5, 0);

--
-- Update MFA plugins' publish status

UPDATE "#__extensions" AS "a"
SET "enabled" = "b"."enabled"
FROM "#__extensions" AS "b"
WHERE "a"."element" = "b"."element"
AND "a"."folder" = 'multifactorauth'
AND "b"."folder" = 'twofactorauth';

--
-- Remove legacy TFA plugins

DELETE FROM "#__extensions"
WHERE "type" = 'plugin' AND "folder" = 'twofactorauth' AND "element" IN ('totp', 'yubikey');

--
-- Add post-installation message

INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
SELECT "extension_id", 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_TITLE', 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_BODY', 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_ACTION', 'com_users', 1, 'action', 'admin://components/com_users/postinstall/multifactorauth.php', 'com_users_postinstall_mfa_action', 'admin://components/com_users/postinstall/multifactorauth.php', 'com_users_postinstall_mfa_condition', '4.2.0', 1 FROM "#__extensions" WHERE "name" = 'files_joomla'
ON CONFLICT DO NOTHING;

--
-- Create a mail template for plg_multifactorauth_email

INSERT INTO "#__mail_templates" ("template_id", "extension", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES
('plg_multifactorauth_email.mail', 'plg_multifactorauth_email', '', 'PLG_MULTIFACTORAUTH_EMAIL_EMAIL_SUBJECT', 'PLG_MULTIFACTORAUTH_EMAIL_EMAIL_BODY', '', '', '{"tags":["code","sitename","siteurl","username","email","fullname"]}')
ON CONFLICT DO NOTHING;


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38687.
avatar brianteeman
brianteeman - comment - 5 Sep 2022

Your first post says

i'v upgraded a CLEAN installation of joomla 4.2.0 to the last one 4.2.2.

that can not be true - your log file shows

#Software: Joomla! 4.1.5 Stable [ Kuamini ] 21-June-2022 14:00 GMT

and if you started from a "clean install of joomla 4.2.0" then there would be zero need to run the queries in f 4.2.0-2022-05-15.sql

avatar spamzini
spamzini - comment - 5 Sep 2022

I have upgraded from 4.1.5 to 4.2.1.
with "clean" i would like to inform that there are no data on the site and it's only joomla file.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38687.

avatar richard67
richard67 - comment - 5 Sep 2022

@spamzini What’s your database server version? Can it be you are running on annold version which does not support utf8mb4 yet? Could this be the reason why you have to use upload all the time for updating because live update would not allow updating on a too old database version?

avatar richard67
richard67 - comment - 7 Sep 2022

Hi,

** I solved with this SQL command:

ALTER TABLE XXXX_mail_templates CHANGE htmlbody htmlbody MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;**

That's definitely the wrong characterset "utf8". Joomla 4 uses "utf8mb4" and requires a database which supports that.

So I ask again: What’s your database server version?

avatar richard67 richard67 - change - 7 Sep 2022
Labels Added: Information Required
avatar richard67 richard67 - labeled - 7 Sep 2022
avatar Quy Quy - change - 25 Nov 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-11-25 15:30:28
Closed_By Quy
avatar Quy Quy - close - 25 Nov 2022
avatar Quy
Quy - comment - 25 Nov 2022

Closing due to no response.

Add a Comment

Login with GitHub to post a comment