This is a full step-by-step instruction to reproduce the problem. It is not intended to be a safe installation and should not be used on a production system or computer with sensitive information on it. There is some steps that don't need root permissions and the use of sudo is generally a better idea then using the root user. However the focus is on providing a minimal amount of steps to reproduce the issue.
- Set up a server: Start with a vanilla CentOS 7.4. Login as root.
- Update server: Run
yum -y upgrade
to update all packages.
- Install webserver: Run
yum -y install httpd mariadb-server mariadb systemctl enable mariadb.service systemctl start mariadb.service mysql_secure_installation
and follow the instructions to set a root password and remove anonymous users of the MySQL server. Now upgrade to MariaDB 10.2 by following the instructions here: Use vi /etc/yum.repos.d/mariadb-10.2.repo to create a new file. Press i to enter insert mode and paste the following text:
# MariaDB 10.2 CentOS repository list - created 2017-07-26 11:13 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.2/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
Press the Esc key to leave the insert mode and save the changes by entering :wq and then pressing return. Next run the following commands:
systemctl stop mariadb.service yum -y update systemctl start mariadb.service mysql_upgrade --user='root' --password yum -y install epel-release rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum-config-manager --enable remi-php71 yum -y install php php-opcache php-mysql
Use vi to edit /etc/php.ini and change the line ;date.timezone = to date.timezone = "Europe/Berlin". Finally run
systemctl enable httpd.service systemctl start httpd.service
- Install MediaWiki 1.30.0: Run
yum -y install texlive php-mbstring php-xml systemctl restart httpd.service mkdir ~/software curl -L -o ~/software/mediawiki-latest.tar.gz https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz tar -xzf ~/software/mediawiki-latest.tar.gz -C ~/software/ cp -r ~/software/mediawiki-1.30.0/* /var/www/html/ chown -R apache:apache /var/www/html/images chcon -t httpd_sys_rw_content_t /var/www/html/images mysql --user='root' --password -e "CREATE DATABASE IF NOT EXISTS wikidb CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'wikipass'; FLUSH PRIVILEGES;"
Now open a web browser and go to http://example.com/mw-config/index.php (replace example.com by the IP address or FQDN of your server). Select en - English as language of the wiki and installer and click the button Continue->. Read the copyright and terms carefully and and click the button Continue->. Change the field Database name: from my_wiki to wikidb, Database username: from root to wikiuser, enter wikipass into the input field Database password: and click the button Continue-> twice. Then enter TestWiki in the input field under Name of wiki:, choose a usename, password and e-mail address for the administrator account, choose the radio button I'm bored already, just install the wiki. and click the button Continue-> three times. If the download of the file LocalSettings.php did not start automatically, click the link to download the file and open it. Copy all of its contents to the clipboard and run vi /var/www/html/LocalSettings.php on the server. Enter the insert mode and paste the content. Leave the insert mode, save and close the file.
- Create a new extension: Run
mkdir /var/www/html/extensions/Disobey_the_camel_case mkdir /var/www/html/extensions/Disobey_the_camel_case/i18n
Similarly to the creation of the files mariadb-10.2.repo and LocalSettings.php create the following files with their respective contents using vi
vi /var/www/html/extensions/Disobey_the_camel_case/extension.json:
{ "name": "Disobey_the_camel_case", "type": "other", "version": "1.0.0", "license-name": "MIT", "descriptionmsg": "disobeythecamelcase-desc", "requires": { "MediaWiki": ">= 1.27.0", "extensions": { } }, "MessagesDirs": { "Disobey_the_camel_case": [ "i18n" ] }, "manifest_version": 1 }
vi /var/www/html/extensions/Disobey_the_camel_case/i18n/en.json:
{ "disobeythecamelcase-desc": "This extension only demonstrates a bug." }
vi /var/www/html/extensions/Disobey_the_camel_case/i18n/qqq.json:
{ "disobeythecamelcase-desc": "Description of the extension on the Special:Version page." }
vi /var/www/html/extensions/Disobey_the_camel_case/LICENSE.txt:
Hello world!
Finally use vi /var/www/html/LocalSettings.php to append the line wfLoadExtension( 'Disobey_the_camel_case' ); to the LocalSettings.php.
Observed behaviour
When you use a browser to navigate to http://example.com/index.php/Special:Version (replace example.com by the IP address or FQDN of your server) you see the extension Disobey_the_camel_case being listed in the section Installed extensions. When you click on MIT in the column License, you get to the page http://example.com/index.php/Special:Version/License/Disobey_the_camel_case. On that page there is a headline License for Disobey the camel case. Under that headline there is the sentence No detailed license information was found for this extension..
Expected behaviour
When you use a browser to navigate to http://example.com/index.php/Special:Version (replace example.com by the IP address or FQDN of your server) you see the extension Disobey_the_camel_case being listed in the section Installed extensions. When you click on MIT in the column License, you get to the page http://example.com/index.php/Special:Version/License/Disobey_the_camel_case. On that page there is a headline License for "Disobey_the_camel_case". Under that headline there is a grey box showing Hello world! in a monospace font.
Additional information
When you rename the extension so that it does not contain underscores. I.e. to DisobeyTheCamelCase the expected behavior is observed. This should either be fixed or extension names containing underscores should be treated in a different way (i.e. being ignored or produce a warning or error in the log file the extension might cause unexpected behavior due to underscores in its name).