bacbos / bolt-menu-editor

a visual menu-editor extension for the awesome bolt cms
Other
21 stars 23 forks source link

Poor Error-Messages #27

Closed xstable closed 8 years ago

xstable commented 8 years ago

If I've installed the Module and go to Extras ⇒ Menueditor, I got a message:

Please make sure that there is a menueditor/backups folder or disable the backup-feature in config.yml

That msg doesn't helps a lot.

  1. The config.yml has no data of this Extension at all! I have to go to Extras ⇒ Configure Extension ⇒ menueditor.bacboslab.yml So the extension should be able to define the right place, where to change the Configfile.
  2. If I click on "Save" after editing a Menu, I got this message:

Unable to save backup! Please make sure menueditor/backups is writable by your webserver or disable the feature in the extensions configuration.

Folder is not exactly defined. A look into menueditor.bacboslab.yml told me, the path should be:

backupsFolder: app/config/menu-backups

But even If I create this folder app/config/menu-backups and give him 777 permissions, the Error-message still appear.

Then I've gone into the Extension.php and return the value of:

$this->backupDir = $this->app['resources']->getPath('web') . $this->config['backupsFolder'];

This shows, that $this->app['resources']->getPath('web') finished the line with '/.':

/var/www/clients/client1414/web152/web/bolt/.

Would be better to output the exactly path, which was tried to create ( or where to wan't to save the file)!

SvanteRichter commented 8 years ago

Just to clarify this closing: in the 3.1 version that was just released the backup folder is a bolt filesystem path, so all the filesystem stuff will be done by $app['filesystem'].

That should be more robust than before, and it will not even try to touch the backup folder unless backups are turned on. It is also more configurable as it will use the paths that you have defined for bolt instead of concatenating paths on it's own.