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

Unwanted icons visible in buttons and fix incorrect argument order #512

Conversation

satrun77
Copy link

@satrun77 satrun77 commented Jan 25, 2024

Description

The workflow interface looks like the following
Screenshot 2024-01-25 at 12 13 13 PM

Similar issue in silverstripe/silverstripe-admin#1581

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

  • Add a workflow and select the default template

  • The next screen shows the issue 1

  • Go to a page

  • Apply workflow from settings tab

  • There is a PHP error about the argument

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 force-pushed the pulls/fixes-button-icons-and-arg-order branch from fdc4f89 to a4921bc Compare January 25, 2024 03:37
@satrun77 satrun77 marked this pull request as ready for review January 25, 2024 03:42
@satrun77 satrun77 marked this pull request as draft January 25, 2024 03:42
@satrun77 satrun77 force-pushed the pulls/fixes-button-icons-and-arg-order branch 2 times, most recently from 42b4d9f to 0ab17d9 Compare January 25, 2024 03:45
@satrun77 satrun77 force-pushed the pulls/fixes-button-icons-and-arg-order branch from 0ab17d9 to 7f6067b Compare January 25, 2024 03:46
@satrun77 satrun77 marked this pull request as ready for review January 25, 2024 03:46
Comment on lines -274 to +273
$menu->insertBefore($tab, 'MoreOptions');
$menu->insertBefore('MoreOptions', $tab);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this actually a separate problem to the icons problem?
If so, can you please split it out so that each problem being fixed has its own pull request? It will be easier to review that way.

Copy link
Author

Choose a reason for hiding this comment

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

Yes separate. Can do. will do 👍

@GuySartorelli
Copy link
Collaborator

GuySartorelli commented Jan 25, 2024

Also please make sure there is an issue for each pull request (that was in the PR template, looks like you removed that section for some reason in your PR description).
We track issues rather than pull requests, so it will be easier to make sure this contribution doesn't get lost and forgotten if we have an issue for it.

@satrun77
Copy link
Author

Also please make sure there is an issue for each pull request (that was in the PR template, looks like you removed that section for some reason in your PR description). We track issues rather than pull requests, so it will be easier to make sure this contribution doesn't get lost and forgotten if we have an issue for it.

It was accidental 🤣 thanks I will fix that

@satrun77
Copy link
Author

@GuySartorelli PR #513

I will close this one and create another PR for #515

@satrun77 satrun77 closed this Jan 25, 2024
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