Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Request: ActiveRecord missing options_callback #66

Open
dmolineus opened this issue Feb 7, 2020 · 5 comments
Open

Ajax Request: ActiveRecord missing options_callback #66

dmolineus opened this issue Feb 7, 2020 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dmolineus
Copy link
Member

I have a multi column wizard which contains several select fields. All options are computed by an option_callback which relies on the presence of the active record. However, it's missing when a new row is created by the ajax request.

@zonky2 zonky2 added the bug Something isn't working label Feb 7, 2020
@zonky2 zonky2 added this to the 3.4.4 milestone Feb 7, 2020
@discordier
Copy link
Member

I have never used the activeRecord in MCW myself... what is expected to be contained? I suspect the row values of the current row?

I really wonder if this feature was wildly used and therefore wonder how we shall bring it back (IMO your workaround looks much cleaner).

@dmolineus
Copy link
Member Author

dmolineus commented Feb 11, 2020

I have never used the activeRecord in MCW myself... what is expected to be contained? I suspect the row values of the current row?

I actually assume the same behaviour af of Contao options_callback. In Contao the data container contains the current record, it would be great to have access to the current record (outside of the multi column wizard).

Having access to the current record id would be enough, the $mcw->id refers to the widget name instead of the id.

I really wonder if this feature was wildly used and therefore wonder how we shall bring it back (IMO your workaround looks much cleaner).

It only works in the edit action and not in the edit all action (in the referenced case edit all is disabled so it work here) but I need a solution to modifiy the options callback depending on the current record to which the mcw belongs to.

@stefanheimes stefanheimes modified the milestones: 3.4.4, 3.4.5 Mar 8, 2020
@zonky2
Copy link
Contributor

zonky2 commented Jul 4, 2020

@dmolineus is this the same as this menatwork/MultiColumnWizard#23 ?

@dmolineus
Copy link
Member Author

@dmolineus is this the same as this menatwork/MultiColumnWizard#23 ?

No, my issue is about a BC break between the mcw and the mcw bundle.

@zonky2
Copy link
Contributor

zonky2 commented Jul 6, 2020

... @dmolineus is trying to provide a PR in "next" time

@zonky2 zonky2 modified the milestones: 3.4.5, 3.4.x Sep 9, 2020
@zonky2 zonky2 modified the milestones: 3.4.x, 3.5.x Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants