# |
Sep 18th 2019, 13:42 |
alexdd55976 |
just replace default.php in Layouts |
# |
Sep 18th 2019, 13:42 |
jotpe |
Where's the Layout located? |
# |
Sep 18th 2019, 13:40 |
ron.rattie |
Okay, I have a default Layout for the Theme created and yet I'm still seeing the standard CakePHP page. Am I missing something else? |
# |
Sep 18th 2019, 13:38 |
jotpe |
Yes |
# |
Sep 18th 2019, 13:37 |
ron.rattie |
If I'm creating a Theme plugin that should be the default for the whole site, do I add $this->viewBuilder()-setTheme('Modern') to the beforeRender in the main AppController.php AND add $this->addPlugin('Modern') to the main Application.php bootstrap function? |
# |
Sep 18th 2019, 13:33 |
jotpe |
yes |
# |
Sep 18th 2019, 13:31 |
neon1024 |
Just curious |
# |
Sep 18th 2019, 13:31 |
neon1024 |
Are you using the Authorization one also? |
# |
Sep 18th 2019, 13:29 |
jotpe |
:slightly_smiling_face: |
# |
Sep 18th 2019, 13:29 |
jotpe |
The new Authentication Plugin |
# |
Sep 18th 2019, 13:28 |
alexdd55976 |
oh, you are not using Auth... |
# |
Sep 18th 2019, 13:27 |
alexdd55976 |
working now for more then 2 weeks on it |
# |
Sep 18th 2019, 13:27 |
jotpe |
@alexdd55976 I had to set `'queryParam' => 'redirect'` in the AuthenticationMiddleware |
# |
Sep 18th 2019, 13:27 |
alexdd55976 |
i expected something like that... this a lot of weird stuff going on with those tests |
# |
Sep 18th 2019, 13:26 |
neon1024 |
Not too sure then, sorry |
# |
Sep 18th 2019, 13:26 |
alexdd55976 |
all tests look like that. All unit tests are fine, no errors |
# |
Sep 18th 2019, 13:26 |
alexdd55976 |
```2) LoginCest: Login with invalid user Test tests\acceptance\LoginCest.php:loginWithInvalidUser [Error] Class 'AcceptanceTester' not found``` |
# |
Sep 18th 2019, 13:26 |
alexdd55976 |
yes |
# |
Sep 18th 2019, 13:25 |
neon1024 |
..and you run with `vendor/bin/codecept run` |
# |
Sep 18th 2019, 13:24 |
alexdd55976 |
```actor: AcceptanceTester paths: tests: / output: _output data: _data support: _support envs: _envs modules: enabled: - PhpBrowser - \Helper\Acceptance``` |
# |
Sep 18th 2019, 13:24 |
neon1024 |
I’m using `"codeception/codeception": "^2.5"` |
# |
Sep 18th 2019, 13:23 |
neon1024 |
Also check the paths in your codeception.yml |
# |
Sep 18th 2019, 13:23 |
neon1024 |
Well AcceptanceTester is declared in acceptance.suite.yml |
# |
Sep 18th 2019, 13:22 |
alexdd55976 |
seems to be fine. unit tests are running fine. acceptance tests keep missing the class |
# |
Sep 18th 2019, 13:21 |
neon1024 |
I would check your Codeception bootstrap file, and that your composer is loading the correct things |
# |
Sep 18th 2019, 13:17 |
alexdd55976 |
there is no hint |
# |
Sep 18th 2019, 13:16 |
alexdd55976 |
possible.. but no idea how to fix it |
# |
Sep 18th 2019, 13:15 |
neon1024 |
This looks like a class autoloader issue to me |
# |
Sep 18th 2019, 13:13 |
alexdd55976 |
isn'T that happen automatically? `users/login?redirect=somestuff` should be called if not authorized and after login you get redirected |
# |
Sep 18th 2019, 13:10 |
jotpe |
Yes, but i don't want a static redirect. I want to redirect to the requested page |
# |
Sep 18th 2019, 13:09 |
alexdd55976 |
@jotpe ```'loginRedirect' => [ 'controller' => 'Pages', 'action' => 'display', 'dashboard' ],```` in your loadComponent |
# |
Sep 18th 2019, 13:08 |
alexdd55976 |
i have no idea how to get this working |
# |
Sep 18th 2019, 13:08 |
jotpe |
For the Authentication Plugin: How can I redirect to the referer page after successful login? `$this->request->referer()` gives me the login page, since I get redirected to this, if a page needs authentication. F.e. PageXYZ needs Authentication -> Redirect to Login -> Successful Login -> Redirect to PageXYZ |
# |
Sep 18th 2019, 13:08 |
alexdd55976 |
´[Error] Class 'AcceptanceTester' not found´ |
# |
Sep 18th 2019, 13:08 |
alexdd55976 |
who does have a bit (or more) knowledge of codeception? |
# |
Sep 18th 2019, 13:04 |
nils |
@conehead I think that’s for 3.x - however, I think I got it. Thanks tho :slightly_smiling_face: |
# |
Sep 18th 2019, 13:02 |
jotpe |
You can try to find a VERSION.txt in vendor folder or so. There you find the CakePHP Version ;) |
# |
Sep 18th 2019, 13:01 |
chupa |
ty very much |
# |
Sep 18th 2019, 13:01 |
chupa |
Anyways, I'm gonna use the config file and create a new one as per your suggestion. :) |
# |
Sep 18th 2019, 13:00 |
chupa |
as for the version, I don't know. The site's using the latest version of CakePHP and of Croogo, but I guess Croogo is being abandoned as a project... |
# |
Sep 18th 2019, 12:59 |
jotpe |
https://book.cakephp.org/3.0/en/development/configuration.html#writing-configuration-data |