Log message #4262362

# At Username Text
# May 4th 2021, 20:50 tyler.adam.lazenby I really like that last suggestion... but then I have to figure out how to make sure it works with the type keys. And the reason for the no type enum is because I am a stickler for Normalization level 3
# May 4th 2021, 20:36 admad Also instead of Accounts hasMany Addresses you can have Accounts hasOne MailingAddresses and hasOne BillingAddresses (both being aliases of Addresess of specific type).
# May 4th 2021, 20:33 admad A separate table address types seems unnecessary, why not just use a "type" enum column?
# May 4th 2021, 19:00 greg138 Sometimes, the alternatives are a little code smell or building a whole new infrastructure to deal with an additional layer of abstraction.
# May 4th 2021, 18:58 tyler.adam.lazenby see i was almost ok with that... but then I got that "code smell" of the what if situation... but I guess code for simplicity and document it well rather than complexity and think you only have to document "use this simple method to do everything from a to z"
# May 4th 2021, 18:51 greg138 This would get you to having a reliable order of records, at least, which then lets you do a loop over the present address records in the template and output fields for them with indexes that will match when you go to patch the entity.
# May 4th 2021, 18:49 greg138 Can you put a sort order column in your address types, and include that in your containment and sort your address records by that?
# May 4th 2021, 18:49 greg138 I'm assuming that you care about the order of the controls on the edit page, that you don't want it to sometimes have mailing address before shipping and sometimes after?
# May 4th 2021, 18:47 greg138 And then there's various ways to go, but maybe a little utility function that reorganizes the array indices for the addresses on an account to match this?
# May 4th 2021, 18:44 greg138 In that case, I think the order of the controls in the template shouldn't need to match the order of the associated records in the entity that you're patching? And they don't need to be sequential either. You could always use .0 in your template for mailing address and .1 for billing and .2 for shipping, for example. If there's no data at all submitted for .1, that's fine for the marshaller.
# May 4th 2021, 18:36 tyler.adam.lazenby For the action, yes I can know the template which types of address are *supposed to be present on the record. And I am using `replace` strategy ... I think*
# May 4th 2021, 18:33 greg138 That doesn't answer either of my questions. :)
# May 4th 2021, 18:07 tyler.adam.lazenby shipping is a POSSIBLE use case
# May 4th 2021, 18:07 tyler.adam.lazenby oh and shipping as well, but that one isn't being used here
# May 4th 2021, 17:55 tyler.adam.lazenby mailing and billing
# May 4th 2021, 17:55 tyler.adam.lazenby So far, only two types of addresses are available, and they are set with a migration seed. I don't plan on making that mutable either
# May 4th 2021, 17:46 greg138 Can you reliably know which types of addresses are *supposed* to be present on the record? Assuming you're using the `replace` save strategy, not `append`?
# May 4th 2021, 17:26 tyler.adam.lazenby because not all accounts are going to have billing addresses since some of them are going to be reseller accounts
# May 4th 2021, 17:25 tyler.adam.lazenby I can't trust the order in which the address are loaded
# May 4th 2021, 17:08 greg138 Or is it because you can't trust the order that the addresses are loaded?
# May 4th 2021, 17:07 greg138 Isn't it then just the label that you need to change, not the column name?
# May 4th 2021, 16:28 tyler.adam.lazenby but the problem is that the first address in the table MIGHT not always be the mailing address.
# May 4th 2021, 16:27 tyler.adam.lazenby I already know how to use this type of syntax ```<?= $this->Form->control('addresses.0.line_one', [ 'class' => 'form-control', 'required', 'label' => __('Address Line One'), ]) ?>```
# May 4th 2021, 16:13 paolo.bragagni Awesome is awesome, but oauth2 plugin is for V.3
# May 4th 2021, 16:12 slackebot states table has its native id and is linked to the addresses table by `addresses.states` my question at this point is how to format it so that I don't have to write some thing like this
# May 4th 2021, 16:12 tyler.adam.lazenby So dumb question... How would I format a Form control with the form helper to work with multiple types of addresses for an account I have four tables `accounts` `addresses` `address_types` `states` The accounts table has its native id and is linked to the addresses table by `addresses.account_id` The address_types table has its native id and is linked to the addresses table by `addresses.address_type_id` The
# May 4th 2021, 14:10 paolo.bragagni only for for cakephp 3 ..
# May 4th 2021, 14:09 slackebot ~tell Braguzz about awesome
# May 4th 2021, 14:09 slackebot Command sent from Slack by admad:
# May 4th 2021, 14:08 paolo.bragagni how to authenticate via an oauth2 provider?
# May 4th 2021, 14:04 greg138 "management"?
# May 4th 2021, 14:03 mehov @greg138 hi, thank you for replying. The thing is I'm planning to reuse the latter template for pages like index, create etc., for someone reading my code the template name `overview' in that case may not make sense
# May 4th 2021, 13:55 greg138 article_detail and article_overview?
# May 4th 2021, 13:54 greg138 Did you update the PHP session timeout or just the Cake one? Both will affect this.
# May 4th 2021, 11:46 mehov The closest related term I can think of is '*hydrated*', but I'm not 100% sure it applies in my case
# May 4th 2021, 10:39 mehov Hi everyone, I have a quick wording question. I'm about to create two reusable master templates for my Articles controller: one for when we're working with a specific article (i.e. edit, delete, etc.), and another for article-agnostic, i.e. index, create pages. How should I name them? 'article_inside' and 'article_outside'? I'm pretty sure more professional terms already exist, but I have no idea how to search.
# May 4th 2021, 09:21 dereuromark You could upgrade an existing one.
# May 4th 2021, 09:10 eax I’ve tried setting “timeout” to a couple of days, but that didn’t change anything, thanks though! :$
# May 4th 2021, 08:54 marcusgoede hi everybody, is there a EAV (entity, attribute, value) plugin for cakephp 4? i only find some for cakephp 3
# May 4th 2021, 08:40 erwane Could be Session time ?
# May 4th 2021, 08:05 eax Hey folks! I have system running CakePHP 3.6.14, where I have started experiencing users being logged out at random times, seemingly without rhyme or reason. Does anyone know what that could be? :$