Extension version check not working

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
</Solidjeuh>
Registered User
Posts: 1715
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Extension version check not working

Post by </Solidjeuh> » Fri Apr 27, 2018 3:02 pm

Hey all,

I'm trying to make a little extension for my forum and a friends forum.
But I can't get the version check to work, I always get: "Version check failed"
At the moment the ext is installed on my forum, and the version check on the same domain.
What am I doing wrong?

solidjeuh/aangepastetaal/composer.json:

Code: Select all

{
    "name": "solidjeuh/aangepastetaal",
    "type": "phpbb-extension",
    "description": "Voegt aangepaste taal strings toe aan je forum.",
    "homepage": "https://www.muziekpromo.net",
    "version": "1.0.0",
    "time": "2018-04-27",	
    "license": "GPL-2.0",
    "authors": [
        {
            "name": "Andy Dm",
            "username": "Solidjeuh",
            "email": "Info@muziekpromo.net",
            "homepage": "https://www.muziekpromo.net",
            "role": "developer"
        }
    ],
    "require": {
        "php": ">=5.4",
        "phpbb/phpbb": ">=3.2.0"
    },
    "extra": {
        "display-name": "Aangepaste Taal Strings",
        "soft-require": {
            "phpbb/phpbb": ">=3.2.0"
        },
        "version-check": {
            "host": "muziekpromo.net",
            "directory": "/scripts/extensies",
            "filename": "aangepastetaal.json"
        }
    }
}
And the version check file in: /scripts/extensies/aangepastetaal.json

Code: Select all

{
    "stable": {
        "1.0": {
            "current": "1.0.0",
            "download": "https://www.muziekpromo.net/scripts/extensies/aangepastetaal.zip",
            "announcement": "https://www.muziekpromo.net/",
            "eol": null,
            "security": false
        }
    },
    "unstable": {
        "1.0": {
            "current": "1.0.0",
            "download": "https://www.muziekpromo.net/scripts/extensies/aangepastetaal.zip",
            "announcement": "https://www.muziekpromo.net/",
            "eol": null,
            "security": false
        }
    }
}

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4014
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Extension version check not working

Post by HiFiKabin » Fri Apr 27, 2018 3:33 pm

For reference my versioncheck files are slightly different to yours and you are missing a leading / on line 20 in your composor.json

Code: Select all

{
    "stable": {
        "0.0": {
            "current": "3.2.2",
            "announcement": "https://phpbb.hifikabin.me.uk/viewtopic.php?p=550#p550",
            "download": "https://phpbb.hifikabin.me.uk/download/file.php?id=846",
            "eol": null,
            "security": false
        }
    }
}
and the corresponding composer is

Code: Select all

{
	"name": "hifikabin/rightheaderimage",
	"type": "phpbb-extension",
	"description": "Adds second clickable image to the right hand side of your header bar. NOTE This extension is for phpBB3.2.x ONLY",
	"homepage": "https://phpbb.hifikabin.me.uk",
	"version": "3.2.2",
	"license": "GPL-2.0",
	"authors": [{
		"name": "James Newcombe",
		"username": "hifikabin",
		"email": "webmaster@hifikabin.me.uk",
		"homepage": "http://phpbb.hifikabin.me.uk",
		"role": "Developer"
	}],
	"require": {
		"php": ">=5.4.0"
	},
	"extra": {
		"display-name": "Right Side Header Image",
		"soft-require": {
		"phpbb/phpbb": ">=3.2.0@dev"
	},
	"version-check": {
		"host": "versioncheck.hifikabin.me.uk",
		"directory": "/320",
		"filename": "/rightheaderimage__versions.json"
		}
	}
}
Something I have discovered along the extension 'journey' is if you have a redirect in your .htaccess the version check will not function.

User avatar
</Solidjeuh>
Registered User
Posts: 1715
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Extension version check not working

Post by </Solidjeuh> » Fri Apr 27, 2018 3:34 pm

Hey HiFiKabin,

Kasimi helped me in the mirc chatroom.
I needed to add "ssl": true and add www. to my host "host": "www.muziekpromo.net",
That worked. But thank you for the quick reply!

Post Reply

Return to “Extension Writers Discussion”