mineka

and you can do something like

  1. if (!$this->DidAfterWriteRunAlready)
  2. {
  3. $this->DidAfterWriteRunAlready = true;
  4. //do your magic
  5. }
vanny

if I want to run a onAfterWrite on Member in the Member extension file (automatically updating some setting based on selection). How do I get it to only run once, and also who do I reference the record, as $this->ID returned an error

Mo

Or add it to the source record (which would automatically add it to the version table)

Mo

If you could find a way to require the user to enter a commit message before save, then you could add the "ChangeMessage" to the versioned table directly I suppose

andante

huh thats a good idea actually - piggyback on versioned somehow

wmk

Is there a ready-to-use module for stuff like "change messages" for pages? something similar to git commit messages so we can see who changed something (and why...) in the past?

mmativ

Hi, is someone experience this before, it's happen when i try to import sql via CLI?

  1. ERROR 1068 (42000) at line 1149772: Multiple primary key defined
mark a j adriano

Did you recreate the table or Truncate it before importing the sql file?

mark a j adriano

have you tried importing the file via SequelPro or MySQL UI interface?

mark a j adriano

my guess is you have a record on that line that has a same record id

mmativ

I got this on that line

  1. ALTER TABLE `table`
  2. ADD PRIMARY KEY (`id`),
  3. ADD KEY `form_id` (`form_id`);
mmativ

Looks like the Primary key and key is not allowed?

mark a j adriano

maybe you just need

  1. ALTER TABLE `Block` ADD KEY `form_id` (`form_id`);
`
mmativ

Its already fixed now, the primary key is being added on create table instead of separate alter.


Show less replies
clodeindustrie

so not sure if I am doing it wrong when adding the fields or if something needs to be done with the React component

Mo

This has changed since 4.4 (I think), I believe you now have to add your date fields to YourDataObject::scaffoldSearchFields()

Mo

I think you can still filter the list in Modeladmin::getList() (as before)

clodeindustrie

I'll have a look at that, thanks a lot for the pointer

👍 (1)
clodeindustrie

I am displaying a composite field in the search from that have two "From" and "To" fields, like it seemed to be done with SS3 however the React component doesn't like it and will return a value of [object + object] on submission