# |
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 |
# |
Sep 18th 2019, 12:59 |
jotpe |
You can set variables in app.php, but would be cleaner to add a separate config file and load it |
# |
Sep 18th 2019, 12:59 |
jotpe |
Hm. Which Cake Version does Croogo use? |
# |
Sep 18th 2019, 12:56 |
chupa |
can i add custom stuff to app.php? All i need is 2 or 3 variables that I use accross the site |
# |
Sep 18th 2019, 12:55 |
chupa |
i get the value and can "read" it but then it throws this error on all sites |
# |
Sep 18th 2019, 12:55 |
chupa |
yeah, it's all there |
# |
Sep 18th 2019, 12:53 |
jotpe |
I'm not into Croogo, but it I guess it's a path error. Is the .env file located in Config folder? |
# |
Sep 18th 2019, 12:44 |
chupa |
I'm not entirely sure why it's requesting the Install plugin from Croogo as this is a working site and has been "installed" 2 years ago |
# |
Sep 18th 2019, 12:44 |
chupa |
line 403] |
# |
Sep 18th 2019, 12:44 |
chupa |
Basically, when I create the .env file and uncomment the block of code in bootstrap.php to enable loading .env files, I get an error: <MY-PROJECT-PATH>/vendor/croogo/croogo/Install/config/routes.php) [<a href='https://secure.php.net/function.include'>function.include</a>]: failed to open stream: No such file or directory [CORE/src/Core/Plugin.php, |
# |
Sep 18th 2019, 12:42 |
chupa |
Hey, has anyone done anything with Croogo (Cake CMS)? I've inherited a project and I think it might be messed up. I'm trying to load the .env file and I'm running into some issues. |
# |
Sep 18th 2019, 12:10 |
conehead |
@nils Where exactly is the problem? Can't you just set `I18n::locale('en_EN');`? |
# |
Sep 18th 2019, 12:07 |
jeremy.payne |
@dereuromark found my issue,t hanks for pointing me in the correct direction ;) |
# |
Sep 18th 2019, 12:05 |
nils |
Basically, how can I change the locale before a find so it makes the find in the locale I want. The problem is that the index is being ran 2 times and the second time the locale stays the same even though I’m changing it on the fly. |
# |
Sep 18th 2019, 11:59 |
jeremy.payne |
@dereuromark defined `FULL_BASE_URL` is pointing to the correct domain |
# |
Sep 18th 2019, 11:58 |
dereuromark |
check base_url config etc. |
# |
Sep 18th 2019, 11:55 |
jeremy.payne |
I tried updating a cake 2.6 app to 2.10.19 (latest), and for some reason `$this->redirect()` now pushes to `http://localhost/` instead of the domain it was on. Googeling hasn't helped me narrow down what the issue could be, nor has reading the migration guides. Any ideas? |
# |
Sep 18th 2019, 11:55 |
alexdd55976 |
one colleague on vacation, other took the day off... 3rd colleahue will start in october 1st... |
# |
Sep 18th 2019, 11:53 |
slackebot |
with the first locale in the array. No idea why… |
# |
Sep 18th 2019, 11:53 |
nils |
I’m using Cake 2.x. I’m also using ElasticIndex to help speed up searches. My app has two languages. So when I save the product I want it to index in both languages. So I’ve simply set up an array with the two languages and running it twice so it changes the index for the second row. In the loop I’ve got setlocale(LC_ALL, $language) and Configure::write(‘Config.language’, $language) - however, the changes aren’t kicking in. It runs |
# |
Sep 18th 2019, 11:51 |
conehead |
Alex but why do you have to sit alone in an office? :) |
# |
Sep 18th 2019, 11:49 |
alexdd55976 |
we need to be the best person we can be. therefore the best community possible. other communites are a PITA (experience it right now).. we don'T wanna be like that |
# |
Sep 18th 2019, 11:48 |
conehead |
Just lets forget bout that last thing. Hope to see you more often here Elasty! |
# |
Sep 18th 2019, 11:47 |
adam282 |
Fun shit |
# |
Sep 18th 2019, 11:47 |
alexdd55976 |
wait for cake4 :) |
# |
Sep 18th 2019, 11:46 |
adam282 |
Nice. Anyways, take it easy y’all. You haven’t heard the last from me, I am sure. CakePHP 3.x is way different than CakePHP 2.x. |
# |
Sep 18th 2019, 11:46 |
alexdd55976 |
at least i got star wars movies running on my phone :) |
# |
Sep 18th 2019, 11:45 |
alexdd55976 |
now i am in a new job, sitting in a office... alone.. :thinking_face: |
# |
Sep 18th 2019, 11:45 |
alexdd55976 |
work from home is cool.. did it the last 3 years |