-
Notifications
You must be signed in to change notification settings - Fork 2
404 on backend admin #15
Comments
Have you updated to the latest? Should be fixed by #12 |
And I just realized I still have the old version compare in the route checker too... Are you on 3.3 or 3.2? |
I'm on 3.2.11 and I'm afraid I can't do |
Ok what version of the extension are you on? If you can't update can apply the changes manually? If so I'll paste right here what you'll need to change Who woulda thought bolt changing the backed extension mount point would cause so much havoc haha |
I'm on 1.1.1 :) |
Ok if you can go to this line bolt-tinypng/src/TinyPNGExtension.php Line 72 in 4013b71
if ( Version::compare('3.3.0', '>=')) {
return [
'/extend/tinypng' => new TinyPNGBackendController($config),
];
} else {
return [
'/extensions/tinypng' => new TinyPNGBackendController($config),
];
} For some reason the logic is reversed and I'll get an actual update for the extension tomorrow to fix it properly! |
second thought I decided to fire up my laptop and the version compare for bolt is still really wonky. For your use case on bolt 3.2.x you can use this for a quick fix: in this method: bolt-tinypng/src/TinyPNGExtension.php Lines 67 to 79 in 4013b71
protected function registerBackendControllers() {
$config = $this->getConfig();
return [
'/extend/tinypng' => new TinyPNGBackendController($config),
];
} I'm putting the below here so I can think it out haha.... when getting the file path for both bolt 3.2.x and 3.3.x we need to do a version compare and reverse the logic. That means instead of thinking the below code says "my current bolt version is greater than or equal too 3.3.0" with a bolt install of 3.3.0 if (Version::compare( '3.3.0', '>=')) {
// the new filepath for bolt 3.3 +
return $this->app['path_resolver']->resolve('files');
} else {
// the old resources for bolt less than 3.3 so anyting 3.2 or "older"
return $this->app['resources']->getPath( 'filespath' );
} we need to flip it: if (Version::compare( '3.3.0', '>=')) {
return $this->app['resources']->getPath( 'filespath' );
} else {
return $this->app['path_resolver']->resolve('files');
} For some reason the same 'reversed' logic isn't working to register a backend controllers route |
hey @zomars I think I knocked this one out ... I'll put a release out here in a bit if you could try it out and let me know that'd be great! Thanks! |
I get my site's 404 when trying to open the extension route:
/bolt/extend/tinypng/files
The text was updated successfully, but these errors were encountered: