# |
Jul 20th 2018, 09:58 |
josbeir |
wuuuh? |
# |
Jul 20th 2018, 09:58 |
neon1024 |
Utter, utter, shite. |
# |
Jul 20th 2018, 09:58 |
neon1024 |
Sequel Pro is a pile utter shite. |
# |
Jul 20th 2018, 09:58 |
josbeir |
sequel pro ! |
# |
Jul 20th 2018, 09:58 |
josbeir |
ah ok :slightly_smiling_face: |
# |
Jul 20th 2018, 09:58 |
neon1024 |
I’m only using them because i built my database in MySQL Workbench, and I need the constraints to draw the lines in the ERD :P |
# |
Jul 20th 2018, 09:57 |
josbeir |
maybe i should change that mindset |
# |
Jul 20th 2018, 09:57 |
josbeir |
hmm i always tought that using fkey constraints in combination with framework ORM's was not a good idea |
# |
Jul 20th 2018, 09:45 |
neon1024 |
Cool, thanks @dereuromark that’s worked for me :slightly_smiling_face: |
# |
Jul 20th 2018, 09:34 |
neon1024 |
Why are foreign key constraints such a PITA |
# |
Jul 20th 2018, 09:34 |
neon1024 |
Kinda shonky :s |
# |
Jul 20th 2018, 09:34 |
neon1024 |
Ahok, so I guess I can just update the table in the migration |
# |
Jul 20th 2018, 09:34 |
dereuromark |
if you can fix your data first, might work as 2 step. |
# |
Jul 20th 2018, 09:33 |
dereuromark |
you add it first without constraint, then you fix your data, then you add a constraint. 3 steps usually, same for required (not null) fields. |
# |
Jul 20th 2018, 09:33 |
neon1024 |
File uploaded https://cakesf.slack.com/files/U1BT622HW/FBTT81A9Z/-.sh / https://slack-files.com/T053DPNCM-FBTT81A9Z-75c044b96b |
# |
Jul 20th 2018, 09:33 |
neon1024 |
` == 20180720083451 CampaignScripts: migrating Exception: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`telecoms_call_centre`.`#sql-2ce5_a83`, CONSTRAINT `#sql-2ce5_a83_ibfk_1` FOREIGN KEY (`campaign_id`) REFERENCES `campaigns` (`id`)) in [/Users/david/Sites/TelecomsCCA/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 338]` |
# |
Jul 20th 2018, 09:32 |
neon1024 |
How do I get around adding a migration with a new foreignKey constraint? |
# |
Jul 20th 2018, 09:08 |
blancessanchez30 |
@neon1024 yes |
# |
Jul 20th 2018, 09:00 |
josbeir |
the new authentication/authorization plugins do a good job at that, usedata is stored in request |
# |
Jul 20th 2018, 08:46 |
dereuromark |
I use a helper here: https://github.com/dereuromark/cakephp-tinyauth/blob/master/docs/Authorization.md#authuserhelper - this also allows for stateless and stateful approaches. Until core can fix itself to a more request driven approach :slightly_smiling_face: |
# |
Jul 20th 2018, 08:44 |
dereuromark |
not really, is that in view template? |
# |
Jul 20th 2018, 08:44 |
neon1024 |
@blancessanchez30 Are you in Cake 2? |
# |
Jul 20th 2018, 08:44 |
neon1024 |
Morning all |
# |
Jul 20th 2018, 08:35 |
blancessanchez30 |
??? |
# |
Jul 20th 2018, 08:35 |
blancessanchez30 |
<?php echo AuthComponent::user('firstname').' '.AuthComponent::user('lastname')?> |
# |
Jul 20th 2018, 08:35 |
blancessanchez30 |
? |
# |
Jul 20th 2018, 08:35 |
blancessanchez30 |
is this a goood practice/ |
# |
Jul 20th 2018, 07:28 |
birdy247 |
that does the trick |
# |
Jul 20th 2018, 07:28 |
birdy247 |
plugin = null |
# |
Jul 20th 2018, 07:28 |
birdy247 |
ahhhh |
# |
Jul 20th 2018, 07:24 |
birdy247 |
what is the 0. |
# |
Jul 20th 2018, 07:24 |
birdy247 |
| 0.articles:view | /:sectionslug/:id-:slug | {"action":"view","controller":"Articles","plugin":false} | |
# |
Jul 20th 2018, 07:24 |
birdy247 |
this is what I see |
# |
Jul 20th 2018, 07:23 |
birdy247 |
when i check routes |
# |
Jul 20th 2018, 07:23 |
birdy247 |
I cannot be 100% sure, but think this worked fine before a cake update |
# |
Jul 20th 2018, 07:23 |
birdy247 |
One of my routes is not being matched correctly |
# |
Jul 20th 2018, 07:04 |
asdfgh |
anyone ? |
# |
Jul 20th 2018, 07:01 |
blancessanchez30 |
because $this->Html->script(''); is not working, cakephp 2 |
# |
Jul 20th 2018, 07:01 |
blancessanchez30 |
hello i have a question, how do you define link for a javascript from a template? |
# |
Jul 20th 2018, 06:52 |
asdfgh |
i get [BadMethodCallException] Unknown method "getRepository" |
# |
Jul 20th 2018, 06:52 |
asdfgh |
is elasticsearch plugin not compatibiel with php 7.2 ? |