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

FIX Argument order of insertBefore method #513

Merged

Conversation

satrun77
Copy link

@satrun77 satrun77 commented Jan 25, 2024

Description

When applying workflow to a page. There is an error related to an incorrect argument for insertBefore

[Emergency] Uncaught TypeError: SilverStripe\Forms\FieldList::insertBefore(): Argument #2 ($item) must be of type SilverStripe\Forms\FormField, string given, called in /Users/mo/Sites/cms/vendor/silverstripe/framework/src/Forms/CompositeField.php on line 349

Manual testing steps

  • Create a new workflow and select a default template
  • Fill in all required fields for workflow and save
  • Create another workflow
  • Go to Pages
  • Edit a page
  • Go to settings
  • Select the workflow you have created in Applied Workflow
  • Select the second workflow in Additional Workflows
  • Save and go back to the Content tab
  • There is an error about the incorrect argument

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

@satrun77 satrun77 marked this pull request as ready for review January 25, 2024 20:56
Copy link
Collaborator

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience - works well locally now that I can reproduce.

@GuySartorelli
Copy link
Collaborator

GuySartorelli commented Jan 25, 2024

As with the other PR you did, if you want to retarget this to the 6.1 branch it can be released immediately - but otherwise I'm happy to merge as-is and it'll be released in April

@satrun77 satrun77 changed the base branch from 6 to 6.1 January 26, 2024 00:22
@satrun77 satrun77 force-pushed the pulls/fix-argument-order branch from 213256b to 8f08322 Compare January 26, 2024 00:24
Copy link
Collaborator

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GuySartorelli GuySartorelli merged commit 091b85c into symbiote:6.1 Jan 26, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants