diff --git a/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/libmediawiki.sh b/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/libmediawiki.sh index 5200a4c98d321..fc9c8f2769577 100644 --- a/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/libmediawiki.sh +++ b/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/libmediawiki.sh @@ -151,7 +151,12 @@ mediawiki_initialize() { db_port="$MEDIAWIKI_DATABASE_PORT_NUMBER" mediawiki_wait_for_db_connection "$db_host" "$db_port" "$db_name" "$db_user" "$db_pass" # Perform MediaWiki database schema upgrade - debug_execute php "${MEDIAWIKI_BASE_DIR}/maintenance/update.php" + info "Performing database schema upgrade if needed" + update_args="" + if is_boolean_yes "$MEDIAWIKI_SKIP_CONFIG_VALIDATION"; then + update_args+=" --skip-config-validation" + fi + debug_execute php "${MEDIAWIKI_BASE_DIR}/maintenance/update.php" $update_args fi # Avoid exit code of previous commands to affect the result of this function diff --git a/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/mediawiki-env.sh b/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/mediawiki-env.sh index c3d8008f3f6c8..14be8d95e8056 100644 --- a/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/mediawiki-env.sh +++ b/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/mediawiki-env.sh @@ -46,6 +46,7 @@ mediawiki_env_vars=( MEDIAWIKI_DATABASE_NAME MEDIAWIKI_DATABASE_USER MEDIAWIKI_DATABASE_PASSWORD + MEDIAWIKI_SKIP_CONFIG_VALIDATION SMTP_HOST SMTP_HOST_ID SMTP_PORT @@ -76,6 +77,7 @@ export MEDIAWIKI_CONF_FILE="${MEDIAWIKI_BASE_DIR}/LocalSettings.php" # MediaWiki persistence configuration export MEDIAWIKI_VOLUME_DIR="${BITNAMI_VOLUME_DIR}/mediawiki" export MEDIAWIKI_DATA_TO_PERSIST="${MEDIAWIKI_DATA_TO_PERSIST:-images extensions skins LocalSettings.php}" +export MEDIAWIKI_SKIP_CONFIG_VALIDATION="${MEDIAWIKI_SKIP_CONFIG_VALIDATION:-no}" # MediaWiki site configuration export MEDIAWIKI_SKIP_BOOTSTRAP="${MEDIAWIKI_SKIP_BOOTSTRAP:-}" # only used during the first initialization diff --git a/bitnami/mediawiki/README.md b/bitnami/mediawiki/README.md index 955cb9f212017..4529bf571fb3d 100644 --- a/bitnami/mediawiki/README.md +++ b/bitnami/mediawiki/README.md @@ -222,6 +222,7 @@ docker run -d --name mediawiki \ | `MEDIAWIKI_DATABASE_NAME` | Database name. | `bitnami_mediawiki` | | `MEDIAWIKI_DATABASE_USER` | Database user name. | `bn_mediawiki` | | `MEDIAWIKI_DATABASE_PASSWORD` | Database user password. | `nil` | +| `MEDIAWIKI_SKIP_CONFIG_VALIDATION` | Skip config validation during startup. Allows the use of deprecated values in MediaWiki configuration file. Valid values: `yes`, `no`. | `no` | #### Read-only environment variables