Unable to install h5p on Moodle 3.5
Submitted by huwhuw on Fri, 04/24/2020 - 13:00
Hi i downloaded and tried to install the h5p plugin into a moodle installation db collation of my moodle is utf8_general_ci
Here is the error I am getting - how can this be fixed I cant see any solutions in Moodle.org
Thanks.
Upgrading to new version
mod_hvp
More information about this error
×Debug info: Unknown collation: 'utf8'CREATE TABLE mdl_hvp (
id BIGINT(10) NOT NULL auto_increment,
course BIGINT(10) NOT NULL DEFAULT 0,
name VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
intro LONGTEXT COLLATE utf8,
introformat SMALLINT(4) NOT NULL DEFAULT 0,
json_content LONGTEXT COLLATE utf8 NOT NULL,
embed_type VARCHAR(127) COLLATE utf8 NOT NULL DEFAULT '',
disable BIGINT(10) NOT NULL DEFAULT 0,
main_library_id BIGINT(10) NOT NULL,
content_type VARCHAR(127) COLLATE utf8,
authors LONGTEXT COLLATE utf8,
source VARCHAR(255) COLLATE utf8,
year_from SMALLINT(4),
year_to SMALLINT(4),
license VARCHAR(63) COLLATE utf8,
license_version VARCHAR(15) COLLATE utf8,
changes LONGTEXT COLLATE utf8,
license_extras LONGTEXT COLLATE utf8,
author_comments LONGTEXT COLLATE utf8,
filtered LONGTEXT COLLATE utf8,
slug VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
timecreated BIGINT(10) NOT NULL DEFAULT 0,
timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
ROW_FORMAT=Compressed
COMMENT='Activity data'
;
CREATE TABLE mdl_hvp_xapi_results (
id BIGINT(10) NOT NULL auto_increment,
content_id BIGINT(10) NOT NULL,
user_id BIGINT(10) NOT NULL,
parent_id BIGINT(10),
interaction_type VARCHAR(127) COLLATE utf8 NOT NULL DEFAULT '',
description LONGTEXT COLLATE utf8 NOT NULL,
correct_responses_pattern LONGTEXT COLLATE utf8 NOT NULL,
response LONGTEXT COLLATE utf8 NOT NULL,
additionals LONGTEXT COLLATE utf8 NOT NULL,
raw_score MEDIUMINT(6),
max_score MEDIUMINT(6),
CONSTRAINT PRIMARY KEY (id)
, UNIQUE KEY mdl_hvpxapiresu_idconuse_uix (id, content_id, user_id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Stored xAPI events'
;
CREATE TABLE mdl_hvp_content_user_data (
id BIGINT(10) NOT NULL auto_increment,
user_id BIGINT(10) NOT NULL,
hvp_id BIGINT(10) NOT NULL,
sub_content_id BIGINT(10) NOT NULL,
data_id VARCHAR(127) COLLATE utf8,
data LONGTEXT COLLATE utf8,
preloaded TINYINT(1) NOT NULL,
delete_on_content_change TINYINT(1) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Stores user data about the content'
;
CREATE TABLE mdl_hvp_libraries (
id BIGINT(10) NOT NULL auto_increment,
machine_name VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
title VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
major_version SMALLINT(4) NOT NULL,
minor_version SMALLINT(4) NOT NULL,
patch_version SMALLINT(4) NOT NULL,
runnable TINYINT(1) NOT NULL,
fullscreen TINYINT(1) NOT NULL DEFAULT 0,
embed_types VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
preloaded_js LONGTEXT COLLATE utf8,
preloaded_css LONGTEXT COLLATE utf8,
drop_library_css LONGTEXT COLLATE utf8,
semantics LONGTEXT COLLATE utf8 NOT NULL,
restricted TINYINT(1) NOT NULL DEFAULT 0,
tutorial_url VARCHAR(1000) COLLATE utf8,
has_icon TINYINT(1) NOT NULL DEFAULT 0,
add_to LONGTEXT COLLATE utf8,
metadata_settings LONGTEXT COLLATE utf8,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_hvplibr_macmajminpatrun_ix (machine_name, major_version, minor_version, patch_version, runnable)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
ROW_FORMAT=Compressed
COMMENT='Stores information about libraries.'
;
CREATE TABLE mdl_hvp_libraries_hub_cache (
id BIGINT(10) NOT NULL auto_increment,
machine_name VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
major_version SMALLINT(4) NOT NULL,
minor_version SMALLINT(4) NOT NULL,
patch_version SMALLINT(4) NOT NULL,
h5p_major_version SMALLINT(4),
h5p_minor_version SMALLINT(4),
title VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
summary LONGTEXT COLLATE utf8 NOT NULL,
description LONGTEXT COLLATE utf8 NOT NULL,
icon VARCHAR(511) COLLATE utf8 NOT NULL DEFAULT '',
created_at BIGINT(11) NOT NULL,
updated_at BIGINT(11) NOT NULL,
is_recommended TINYINT(1) NOT NULL,
popularity BIGINT(10) NOT NULL,
screenshots LONGTEXT COLLATE utf8,
license LONGTEXT COLLATE utf8,
example VARCHAR(511) COLLATE utf8 NOT NULL DEFAULT '',
tutorial VARCHAR(511) COLLATE utf8,
keywords LONGTEXT COLLATE utf8,
categories LONGTEXT COLLATE utf8,
owner VARCHAR(511) COLLATE utf8,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
ROW_FORMAT=Compressed
COMMENT='Caches content types from the H5P hub.'
;
CREATE TABLE mdl_hvp_libraries_libraries (
id BIGINT(10) NOT NULL auto_increment,
library_id BIGINT(10) NOT NULL,
required_library_id BIGINT(10) NOT NULL,
dependency_type VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Library dependencies'
;
CREATE TABLE mdl_hvp_libraries_languages (
id BIGINT(10) NOT NULL auto_increment,
library_id BIGINT(10) NOT NULL,
language_code VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
language_json LONGTEXT COLLATE utf8 NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Translations for libraries'
;
CREATE TABLE mdl_hvp_libraries_cachedassets (
id BIGINT(10) NOT NULL auto_increment,
library_id BIGINT(10) NOT NULL,
hash VARCHAR(64) COLLATE utf8 NOT NULL DEFAULT '',
CONSTRAINT PRIMARY KEY (id)
, UNIQUE KEY mdl_hvplibrcach_libhas_uix (library_id, hash)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Use to know which caches to clear when a library is updated'
;
CREATE TABLE mdl_hvp_contents_libraries (
id BIGINT(10) NOT NULL auto_increment,
hvp_id BIGINT(10) NOT NULL,
library_id BIGINT(10) NOT NULL,
dependency_type VARCHAR(10) COLLATE utf8 NOT NULL DEFAULT '',
drop_css TINYINT(1) NOT NULL,
weight BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_hvpcontlibr_dro_ix (drop_css)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Store which library is used in which content.'
;
CREATE TABLE mdl_hvp_events (
id BIGINT(10) NOT NULL auto_increment,
user_id BIGINT(10) NOT NULL,
created_at BIGINT(10) NOT NULL,
type VARCHAR(63) COLLATE utf8 NOT NULL DEFAULT '',
sub_type VARCHAR(63) COLLATE utf8 NOT NULL DEFAULT '',
content_id BIGINT(10) NOT NULL,
content_title VARCHAR(255) COLLATE utf8 NOT NULL DEFAULT '',
library_name VARCHAR(127) COLLATE utf8 NOT NULL DEFAULT '',
library_version VARCHAR(31) COLLATE utf8 NOT NULL DEFAULT '',
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Keep track of logged H5P events'
;
CREATE TABLE mdl_hvp_tmpfiles (
id BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='Keep track of files uploaded before content is saved'
;
CREATE TABLE mdl_hvp_counters (
id BIGINT(10) NOT NULL auto_increment,
type VARCHAR(63) COLLATE utf8 NOT NULL DEFAULT '',
library_name VARCHAR(127) COLLATE utf8 NOT NULL DEFAULT '',
library_version VARCHAR(31) COLLATE utf8 NOT NULL DEFAULT '',
num BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_hvpcoun_typliblib_ix (type, library_name, library_version)
)
ENGINE = InnoDB
DEFAULT COLLATE = utf8
COMMENT='A set of global counters to keep track of H5P usage'
Error code: ddlexecuteerror×Stack trace:
- line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
- line 1049 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
- line 425 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
- line 370 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
- line 770 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
- line 512 of /lib/upgradelib.php: call to upgrade_plugins_modules()
- line 1857 of /lib/upgradelib.php: call to upgrade_plugins()
- line 694 of /admin/index.php: call to upgrade_noncore()
Content types:
huwhuw
Fri, 04/24/2020 - 16:54
Permalink
Updated comment notification
Updated comment notification
BV52
Fri, 04/24/2020 - 18:43
Permalink
Hi huwhuw,Please enable the
Hi huwhuw,
Please enable the Moodle debugger and try again. It should give us a more exact cause of the problem. This post may also help with narrowing the issue.
-BV
orlaine
Sun, 06/07/2020 - 13:11
Permalink
Unable to install h5p on Moodle 3.8
I have a similar problem.
Can you please help me to resolve it. I've been trying to find the problem for 2 days but i can't find it
BV52
Mon, 06/08/2020 - 19:44
Permalink
Hi orlaine,Would you mind
Hi orlaine,
Would you mind providing more details:
-BV