# |
May 16th 2018, 15:19 |
pmoraes |
I dont think so |
# |
May 16th 2018, 15:18 |
saeideng |
because you rendered message before target page |
# |
May 16th 2018, 15:18 |
pmoraes |
render flash is in the layout page |
# |
May 16th 2018, 15:18 |
pmoraes |
yes |
# |
May 16th 2018, 15:18 |
bernat |
does that other page render the flash element? |
# |
May 16th 2018, 15:17 |
pmoraes |
its not showing in the other page |
# |
May 16th 2018, 15:17 |
pmoraes |
$this->redirect(); |
# |
May 16th 2018, 15:17 |
pmoraes |
then |
# |
May 16th 2018, 15:17 |
pmoraes |
so now if I use $this->Flash->success(__('any message')); |
# |
May 16th 2018, 15:16 |
pmoraes |
if I just render the view page it works |
# |
May 16th 2018, 15:16 |
pmoraes |
I'm having a really strange issue |
# |
May 16th 2018, 15:16 |
pmoraes |
cakephp 3.6 |
# |
May 16th 2018, 15:16 |
pmoraes |
by a chance, anyone is having any issues with Flash messages? |
# |
May 16th 2018, 15:15 |
pmoraes |
good morning guys |
# |
May 16th 2018, 15:15 |
neon1024 |
Also you might want to add a rule to your webserver to prevent missing file urls being passed to PHP |
# |
May 16th 2018, 15:15 |
neon1024 |
But you can also use `$this->Html->image('/files/example.jpg')` just as @saeideng suggested :thumbsup: |
# |
May 16th 2018, 15:14 |
neon1024 |
I tended to use `$this->Html->image('../files/example/test.jpg');` |
# |
May 16th 2018, 15:08 |
saeideng |
just add `/` before the `images` |
# |
May 16th 2018, 15:07 |
saeideng |
`this->Url->image(`/images/1.jpg') |
# |
May 16th 2018, 15:01 |
alexdd55 |
i saved images under files and now i get a warning because “controller files does not exist” .. any idea? |
# |
May 16th 2018, 14:57 |
neon1024 |
@admad Thanks again for the tips, I have something functioning now that I can build on :thumbsup: |
# |
May 16th 2018, 14:51 |
lorenzo |
right, the thing is that translate behavior can also filter results based on whether or not the translation is present |
# |
May 16th 2018, 14:50 |
ndm |
@itmpls You're welcome |
# |
May 16th 2018, 14:50 |
ndm |
@lorenzo I see. It was at least unexpected, given that the `*JoinWith()` methods are described to not include the data. And the time it took to debug this to figure out what's causing it was indeed a little annoying ;) |
# |
May 16th 2018, 14:50 |
alexdd55 |
is it possible to define a folder like img/ css/ adiditioanlly… need a folder files/ to be handled like those others |
# |
May 16th 2018, 14:49 |
itmpls |
save my life on a daily basis |
# |
May 16th 2018, 14:49 |
itmpls |
@ndm dude, thank you for all your answers on SO if I haven't already said it |
# |
May 16th 2018, 14:48 |
alexdd55 |
whaddap dudes |
# |
May 16th 2018, 14:45 |
lorenzo |
if it is annoying we could add code to the behavior to read a query option to disable itself |
# |
May 16th 2018, 14:45 |
lorenzo |
translate behavior is not special |
# |
May 16th 2018, 14:45 |
lorenzo |
joinWith is always going to attach any logic that the association has |
# |
May 16th 2018, 14:44 |
lorenzo |
yes |
# |
May 16th 2018, 14:41 |
ndm |
@lorenzo A quick question in case you're not busy... Is it the expected behavior that when using the query builders `*JoinWith()` methods with associations that have the `Translate` behavior attached, this causes the joined association to also be contained, ie the associated records are being queried and included in the results? |
# |
May 16th 2018, 14:39 |
itmpls |
and if there isn't an established valid refresh token as well |
# |
May 16th 2018, 14:38 |
itmpls |
anyone familiar with refresh token flow? once i create a refresh token for an access token, i'm letting the "claim" last 2 hours. should my client side app try just refreshing it at an X interval if the initial access token has expired? |
# |
May 16th 2018, 14:31 |
admad |
the code is correct :slightly_smiling_face: |
# |
May 16th 2018, 14:30 |
neon1024 |
Your docblock says 304, but your code is 301 :P |
# |
May 16th 2018, 14:29 |
neon1024 |
Thanks! I’ll take a look |
# |
May 16th 2018, 14:29 |
admad |
use that instead of core `ErrorHandlerMiddlware` |
# |
May 16th 2018, 14:29 |
neon1024 |
No harm in teaching me something. |
# |
May 16th 2018, 14:28 |
admad |
@neon1024 i am in a spoon feeding mood :slightly_smiling_face: https://gist.github.com/ADmad/606beddce65495d37d5e0bce1e2a7c04 |