Open janeks opened 4 years ago
Here are some things to try:
master
branch. The release version is out of date and only the master
has the latest features and fixes.generateAssetUrl()
, findFirstAsset()
, or $this->assetDirectories
. All of those could affect the icon URLs.Still no luck.
--- Debug output. Request Info button. -------------------------
[banners] => stdClass Object ( [low] => https://domain-name.net/wp-update-server/banners/plugin-slug-772x250.png ) [icons] => Array ( [1x] => https://domain-name.net/wp-update-server/icons/plugin-slug-128x128.png [2x] => https://domain-name.net/wp-update-server/icons/plugin-slug-256x256.png )
--- my custom class -----------------------
class myClass extends Wpup_UpdateServer { protected $serverDirectory; public function construct( $serverUrl = null, $serverDirectory = null ) { parent::construct( $serverUrl ); $this->serverDirectory = $serverDirectory; }
--- UpdateServer.php -----------------------
protected function generateBannerUrl($relativeFileName) {
return $this->generateAssetUrl('banners', $relativeFileName);
}
I've looked at the relevant code once more, and I noticed a bug: when $serverDirectory uses backslashes as directory separators - which is the default on Windows - the update server may generate incorrect URLs for banner and icons exactly like you've shown above. I just committed a patch that should fix this bug - please give it a try.
Note that if you custom class changes $this->serverDirectory
to a non-null value, make sure to pass it through the new $this->normalizeFilePath()
method. For example:
$this->serverDirectory = $this->normalizeFilePath($somePath);
WordPress Updates plugin icon URL points to .../update-server/icons/plugin-slug-256x256.png instead of .../update-server/package-assests/icons/plugin-slug-256x256.png
I have the latest version of both update server and plugin updater. There is a class that extends Wpup_UpdateServer. It's used for license validation. There seems to be nothing related to icons location. Otherwise everything works just fine.
Must be doing something wrong but I don't know what.