# |
Jul 5th 2017, 15:44 |
neon1024 |
Or use h(), then you can see the tags as text :slightly_smiling_face: |
# |
Jul 5th 2017, 15:44 |
rudy1976s |
thank you all |
# |
Jul 5th 2017, 15:44 |
rudy1976s |
I will make some test , it should come from a textarea |
# |
Jul 5th 2017, 15:43 |
neon1024 |
Or try wrapping it with strip_tags() |
# |
Jul 5th 2017, 15:43 |
jeremyharris |
does description have html in it? if so, you’ll want to add ‘html’ => true in the options array |
# |
Jul 5th 2017, 15:43 |
rudy1976s |
yes so I need to understand why on my side :scream: it does |
# |
Jul 5th 2017, 15:42 |
jeremyharris |
it doesn’t add a p tag if that’s your question |
# |
Jul 5th 2017, 15:42 |
rudy1976s |
a small question about Text::truncate : it is normal that it output a p> tag ? I am using this markup : <?=\Cake\Utility\Text::truncate($item->description,50)? |
# |
Jul 5th 2017, 15:41 |
rudy1976s |
hello |
# |
Jul 5th 2017, 15:39 |
juststeveking |
I used a plugin for this, it was working, until I wrapped it in an if condition |
# |
Jul 5th 2017, 15:39 |
juststeveking |
I will have to look into the issue tomorrow, it is getting nowhere :S strange |
# |
Jul 5th 2017, 15:38 |
neon1024 |
Oh right, I was in the interface! D’oh |
# |
Jul 5th 2017, 15:37 |
jeremyharris |
nope: https://api.cakephp.org/3.4/class-Cake.Datasource.EntityTrait.html#_getOriginal |
# |
Jul 5th 2017, 15:37 |
neon1024 |
Hm, is this some filthy magic method? |
# |
Jul 5th 2017, 15:37 |
jeremyharris |
:+1: |
# |
Jul 5th 2017, 15:37 |
neon1024 |
Ahh, thanks @jeremyharris |
# |
Jul 5th 2017, 15:37 |
neon1024 |
Using ->get(‘[original]‘) has nothing |
# |
Jul 5th 2017, 15:37 |
jeremyharris |
getOriginal and getOriginalValues |
# |
Jul 5th 2017, 15:36 |
neon1024 |
I’d like to log the previous value to a table in my beforeSave() |
# |
Jul 5th 2017, 15:36 |
neon1024 |
How do I access the ‘[original]’ in the entity? |
# |
Jul 5th 2017, 15:36 |
juststeveking |
500 :anguished: |
# |
Jul 5th 2017, 15:36 |
jeremyharris |
throw it in your app controller before filter maybe. You might need to do $db = ConnectionManager::get(‘default’); debug($db->listSources()); die; |
# |
Jul 5th 2017, 15:36 |
juststeveking |
That is erroring |
# |
Jul 5th 2017, 15:35 |
juststeveking |
It doesnt seem to like me |
# |
Jul 5th 2017, 15:34 |
jeremyharris |
we just want to see what tables cake is getting from the database |
# |
Jul 5th 2017, 15:34 |
jeremyharris |
just to see (needs to happen after datasources are configured of course) |
# |
Jul 5th 2017, 15:33 |
jeremyharris |
debug and die |
# |
Jul 5th 2017, 15:33 |
jeremyharris |
yeah run it in the bootstrap/core |
# |
Jul 5th 2017, 15:32 |
juststeveking |
I just run that one in my cod? |
# |
Jul 5th 2017, 15:32 |
jeremyharris |
ConnectionManager::getDataSource(‘default’)->listSources() |
# |
Jul 5th 2017, 15:29 |
juststeveking |
Thanks! I have created those directories (didn't exsist) |
# |
Jul 5th 2017, 15:29 |
jeremyharris |
lemme find the code to list all tables that cake sees |
# |
Jul 5th 2017, 15:29 |
jeremyharris |
okay, just checking :slightly_smiling_face: |
# |
Jul 5th 2017, 15:28 |
juststeveking |
It is, but I don't know, it is odd (I didnt build it) |
# |
Jul 5th 2017, 15:28 |
jeremyharris |
if so, clear it out |
# |
Jul 5th 2017, 15:28 |
jeremyharris |
is there anything in app/tmp/cache/models or persistent? |
# |
Jul 5th 2017, 15:28 |
jeremyharris |
well your app could not be respecting that env file |
# |
Jul 5th 2017, 15:27 |
juststeveking |
In the `.env` file I have: `CACHE_DISABLE=1` |
# |
Jul 5th 2017, 15:27 |
juststeveking |
there is no cache enabled at the moment :S |
# |
Jul 5th 2017, 15:27 |
jeremyharris |
rm app/tmp/cache/cake_core* maybe |
# |
Jul 5th 2017, 15:26 |
jeremyharris |
testing my memory here :P |