Closed stagistabm closed 8 years ago
@stagistabm What is it that you changed in permissions.ctp?
every image from example:
$this->Html->image('AclManager.allow_32.png')
to
$this->Html->image('AclManager/img/allow_32.png');
because the output html doesn't find the image.
Yes, I was reviewing now. I think you have made a search and replace and have replaced other routes in your permissions.ctp.
echo $this->Html->css('AclManager/img/default',['inline' => false]); ...
yes!
I think it's not right. Just try it and it does not work, I have also read the manual it says CakePHP and routes the images of the plugins must be so 'AclManager.image.png'. http://book.cakephp.org/3.0/en/plugins.html#linking-to-assets-in-plugins
yes i know, but as you changed your path to AclManager, the output path from the view output is Acl_Manager and then it doesn't find the image.
Both works for me, in a clean installation:
http://caketest.ivanamat.es/users/login
User: demo Pass: demo
Go to http://caketest.ivanamat.es/AclManager/acl/permissions
http://caketest.ivanamat.es/acl_manager/img/allow_inherited_32.png http://caketest.ivanamat.es/AclManager/img/allow_inherited_32.png
on my side cake 3.2 the output is
<img src="/acl_manager/allow_32.png" alt=""/>
so maybe is a problem with the helper, i don't know where is the problem
I also use CakePHP 3.2 and my output as you can see in the demo is:
<img src="/acl_manager/img/allow_inherited_32.png" alt=""/>
Maybe you've created or override some routes?
yes but without touching your routes
I will create a clean install and will review both the error Acl.Acl as images on http://debug.ivanamat.es.
okay, I'll keep in touch!
@stagistabm Here a complete clean installation:
http://debug.ivanamat.es/users/login
User: demo Password: demo
It's all new, the copy of CakePHP 3.2, models, controllers and database.
No Acl.Acl or image issues.
I can't login with those credentials, are you sure you uploaded the latest version to git, is strange, i tried in a second installation
you are right, I can't login. :D
give a look ahah
@stagistabm Try again please! XD
can you paste your permissions.ctp here , is like this? = $this->Html->image('AclManager.allow_32.png');
I uploaded it as txt.
nothing, don't know what's going on, i'll have to modify it then
maybe your baseUrl of app.php or rewrite mod of your hosting?
The default App.php config:
'App' => [
'namespace' => 'App',
'encoding' => env('APP_ENCODING', 'UTF-8'),
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
'base' => false,
'dir' => 'src',
'webroot' => 'webroot',
'wwwRoot' => WWW_ROOT,
// 'baseUrl' => env('SCRIPT_NAME'),
'fullBaseUrl' => false,
'imageBaseUrl' => 'img/',
'cssBaseUrl' => 'css/',
'jsBaseUrl' => 'js/',
'paths' => [
'plugins' => [ROOT . DS . 'plugins' . DS],
'templates' => [APP . 'Template' . DS],
'locales' => [APP . 'Locale' . DS],
],
],
that was the problem, the imageBaseUrl was empty!
I'll prepare the food, it is high time to eat!
yes it is, European?
Yes! From Spain!
Lol bien entonces, se puede hablar espanol, Vivo en italia!
Jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaajajajajaja!! Guten!!
hahahahaha, bien bien entonces, buen plugin !! ahora encontre algun otro error quizas mio, vas directamente al AclManager/ y te manda a AclManager/users/login pero veré màs adelante
Bien, si sabes Español te podré echar una mano bastante mejor, mi ingles es del tipo https://www.youtube.com/watch?v=6LLSDn3_TfE
¿Eso te pasa habiendo iniciado sesión?
sin iniciar sesión y vas directamente al aclmanager, Cafe con leche hahahaha, no lo habia visto, epico jjaaj
@stagistabm El error es por esto, que debe estar en el AppController.php:
...
'unauthorizedRedirect' => [
'controller' => 'Users',
'action' => 'login',
'prefix' => false
],
Debe ser así:
...
'unauthorizedRedirect' => [
'plugin' => false,
'controller' => 'Users',
'action' => 'login',
'prefix' => false
],
Ya lo he cambiado en el README.md
sigue igual!
$this->loadComponent('Auth', [
'authenticate' => [
'Form' => [
'fields' => [
'username' => 'email',
'password' => 'password'
]
]
],
'loginAction' => [
'controller' => 'Users',
'action' => 'login'
],
'unauthorizedRedirect' => [
'plugin' => false,
'controller' => 'Users',
'action' => 'login',
'prefix' => false
],
]);
Especifica todos a ver si te pasa lo mismo:
$this->loadComponent('Auth', [
'authenticate' => [
'Form' => [
'fields' => [
'username' => 'email',
'password' => 'password'
]
]
],
'authorize' => [
'Acl.Actions' => ['actionPath' => 'controllers/']
],
'loginAction' => [
'plugin' => false,
'controller' => 'Users',
'action' => 'login'
],
'loginRedirect' => [
'plugin' => false,
'controller' => 'Posts',
'action' => 'index'
],
'logoutRedirect' => [
'plugin' => false,
'controller' => 'Users',
'action' => 'login'
],
'unauthorizedRedirect' => [
'plugin' => false,
'controller' => 'Users',
'action' => 'login',
'prefix' => false
],
'authError' => 'You are not authorized to access that location.',
'flash' => [
'element' => 'error'
]
]);
y pone el 'authorize';
En teoría es lo de 'plugin' => false, pero copia y pega a ver si te va.
el problema de antes cuando entro en AclManager, cuando navego normal, no aparece el error, The "Acl" alias has already been loaded with the following config: array ( ) which differs from array ( 'className' => 'Acl.Acl', )
M... ¿Me quieres decir que ahora te funciona bien?
condicionando el loadComponent
@stagistabm Puedo echarte una mano a resolver el problema del loadComponent, mediante correo o hangouts? Para no extender los comentarios de la issue original. Yo utilizo Google + o Hangouts, envíame un mail e intentamos solucionar el problema que tienes.
Un saludo!
change your permissions.ctp to this