Closed karneaud closed 5 years ago
Did you run npm run dev
?
@ChristianGiupponi Did not think I had to should I be doing this on install? Where should I be running it? Themes? or root?
Do not remember if is necessary after the install, run it in the root
@ChristianGiupponi if I installed this in production mode could this have caused the error?
Maybe, really never happened that issue so I have no clue. You can also run npm run production
if the site is already in production. Did it solve the problem?
@ChristianGiupponi well I have to npm install
first before I npm run
anything
yes sure
Could you try using 4.0.x-dev
version on a new install?
@nWidart can't I need PHP7.0.*
@ChristianGiupponi tried your suggestion. Did not work
@nWidart is there anyway to fix this without bumping up to 4?
What's the difference with running npm run production
in the root rather than in the AdminLTE theme?
The line in questions seems to come from
var array = string.split(".")
Line number and file name? It might help narrow down where the error is generated.
It could be here
Would it help to say that I am not using Translations? Can I disable it?
In this case, translations is referring to Laravel's way of translating a string (say, blog::posts.title.post
) into human-readable text (e.g.: Blog Post
). As far as I'm aware, there isn't any way to disable them, since it is built into the framework.
In your module's service provider, do you have something like this:
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
// ...
$this->app->make('events')->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) {
});
// ...
}
public function boot()
{
// ...
$this->publishConfig('blog', 'config');
$this->publishConfig('blog', 'permissions');
// ...
}
If you're using translated strings inside your permissions config, you will need to also load the translations into the BackendTranslations event:
$this->app->make('events')->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) {
$event->load('posts', array_dot(trans('blog::posts')));
});
This tells Asgard to load the translations from /Modules/Blog/Resources/lang/{your-lang}/posts.php
.
Apparently something was being passed as "undefined" in the code I mentioned. I just hacked it and it was resolved. You guys need to update it I guess.
What did you hack?
Summary of issue
Cannot display permissions tab in Admin/ backend for a User Role
Steps to reproduce
1) Select A User or User Role 2) Select the permissions tab
System Details
Asgardcms/Platform
version - 3.x