bacbos / bolt-menu-editor

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

BOLT_CONFIG_DIR not being initialized with the latest BOLT version #7

Closed Raistlfiren closed 9 years ago

Raistlfiren commented 9 years ago

Problem: BOLT_CONFIG_DIR was not being set with the latest version of BOLT.

Fix: I used $this->app['paths']['config'] to resolve the correct path for the configuration directory.

bacbos commented 9 years ago

Seems related to https://github.com/bacbos/bolt-menu-editor/pull/6 which I wasn't able to reproduce at the time. I'll dig a bit deeper over the weekend and get back to you. Thanks in the meantime!

Raistlfiren commented 9 years ago

Whoops, I should of noticed that. Thanks for the response!

bacbos commented 9 years ago

I'm very sorry, but I'm still not able to reproduce this, neither on my dev-mac nor on an ordinary LAMP hosting.

I just cloned the latest codebase (https://github.com/bolt/bolt/commit/f58077c68f894b539e37bf07a50fdd9ffd18db5f) and bolt as well as the menu editor extension work out of the box as expected.

BOLT_CONFIG_DIR is being set in https://github.com/bolt/bolt/blob/b9b301dc63f9aaa06a3453c1b05e06988ea6c858/src/Configuration/ResourceManager.php#L348 - in my opinion by looking at some important pieces of code, bolt would not even be able to run in the first place if this constant wasn't being set properly.

I did a quick echo BOLT_CONFIG_DIR; die; in Extension.php of the menu-editor extension and I got the correct path printed out.

Seems like everything's fine on my end, what do you suggest?

Raistlfiren commented 9 years ago

I was able to replicate the problem by using the composer install method - https://docs.bolt.cm/installation-composer. That is how I originally installed bolt as well. I did see the reference for the resourcemanager.php as well, but I don't believe it is being called initially in a composer install.

bacbos commented 9 years ago

Right!

Thanks a lot, merged it in