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 errors in composer container page #1623

Conversation

jordisala1991
Copy link
Member

@jordisala1991 jordisala1991 commented Sep 30, 2022

Subject

I am targeting this branch, because this is a problem for 4.0, since some blocks were removed.

Closes #1611

Changelog

### Added
- Add ability to display and remove blocks that belongs to types that no longer exist on compose page.

@jordisala1991 jordisala1991 force-pushed the hotfix/fix-parent-child-block-relation branch from a444b96 to 84a2b84 Compare September 30, 2022 07:24
@jordisala1991
Copy link
Member Author

I am trying an alternative for: #1611

Wip atm.

@eerison eerison mentioned this pull request Sep 30, 2022
36 tasks
@jordisala1991 jordisala1991 marked this pull request as ready for review October 1, 2022 07:28
@jordisala1991
Copy link
Member Author

This is a bit different implementation than #1611,

@eerison @JeromeEngelnAdeliom can you confirm this also works? I tried to change the minimum code as possible.

@jordisala1991 jordisala1991 force-pushed the hotfix/fix-parent-child-block-relation branch from 50f4dcf to 6f96017 Compare October 1, 2022 07:32
if (false !== $isComposer) {
$form->add('enabled', HiddenType::class, ['data' => true]);
} else {
$form->add('enabled');
}

$form->end();

Copy link
Member Author

Choose a reason for hiding this comment

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

Is better this way, this looks more similar to what we do on shared blocks.

->add('type', ServiceListType::class, ['context' => 'sonata_page_bundle'])
->add('enabled')
->add('position', IntegerType::class)
->add('type', ServiceListType::class, ['context' => 'sonata_page_bundle'])
Copy link
Member Author

Choose a reason for hiding this comment

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

missing indentation. better to code readability.

@SonataCI
Copy link
Collaborator

SonataCI commented Oct 3, 2022

Could you please rebase your PR and fix merge conflicts?

@jordisala1991 jordisala1991 force-pushed the hotfix/fix-parent-child-block-relation branch from 66b6a1e to c313f4e Compare October 4, 2022 06:17
@VincentLanglet
Copy link
Member

Ready to merge @jordisala1991 ?

@jordisala1991 jordisala1991 merged commit dc3481a into sonata-project:4.x Oct 4, 2022
@jordisala1991 jordisala1991 deleted the hotfix/fix-parent-child-block-relation branch October 4, 2022 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants