Development BlogVersion checks for extensions

Post Reply
User avatar
Topic Starter
Restless Rancor
Great Britain

Site Admin
New Member
Posts: 48
Joined: October 15th, 2018, 3:14 pm
Age: 25
Location: Hampshire, England

Version checks for extensions


Post by Restless Rancor » October 20th, 2018, 11:38 am

When an extension is validated at a version checker is automatically added, so admins may see a new version is available, without leaving their ACP.

I wanted to learn the process so that my development extensions could have this feature. I'm a long way off validation, but it'd be nice for people to know an update is available without having to constantly check the development topic.

The guide I followed was very straight forward, but I ran into a problem with placing the version_check.json file under a domain with SSL and more specifically, under which has a temporary redirect to this forum. (I plan on eventually adding a homepage there).

To be absolutely sure it was an SSL related issue I changed the json file location to a non-SSL domain and the version check was successful; I started to think the redirect in the .htaccess at was the culprit, so started to mess with it.

Another topic at had a similar issue, so I tried what was successful for them:

Code: Select all

Redirect 302 /
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Nope. In fact that broke everything.

A while later I remembered reading that using tab for indentations could cause issues and to use 4 spaces instead. The formatting improved, but the version check still failed. (That's actually just for the config/services.yml file).

Comparing with other extensions I saw that I needed to add the SSL status to the composer:

Code: Select all

"version-check": {
            "host": "",
            "directory": "/versions",
            "filename": "postcountonindex.json",
            "ssl": "true"
Broadening my search, I looked to replace the entire .htaccess file to redirect all but a specified folder:

Code: Select all

RewriteCond $1 !^versions
RewriteRule (.*)$1 [R=301,L]
A short while later I added a missing , in the composer and had a successful version check!

These aren't the droids you're looking for.

Post Reply

Topic Subscribers

1 user subscribed to this topic: Restless Rancor