Skip to content

Fix admin templates#18972

Merged
TheMilek merged 1 commit into
Sylius:2.1from
loic425:fix-admin-templates
Apr 9, 2026
Merged

Fix admin templates#18972
TheMilek merged 1 commit into
Sylius:2.1from
loic425:fix-admin-templates

Conversation

@loic425

@loic425 loic425 commented Apr 9, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 2.1
Bug fix? yes
New feature? nos
BC breaks? no
Deprecations? no
Related tickets
License MIT

Apply the fixes we did on Sylius stack:

And this few improvement that is not merged yet:

@loic425 loic425 requested review from a team as code owners April 9, 2026 12:54
@probot-autolabeler probot-autolabeler Bot added the Admin AdminBundle related issues and PRs. label Apr 9, 2026
@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 11bc212d-757b-4f2c-bb61-abf52e223c24

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@loic425 loic425 force-pushed the fix-admin-templates branch from db49964 to 98ebb3f Compare April 9, 2026 14:04
{% set resource = hookable_metadata.context.resource %}
{% set metadata = hookable_metadata.context.metadata %}
{% set configuration = hookable_metadata.context.configuration|default(null) %}
{% set resource = hookable_metadata.context.resource is defined ? hookable_metadata.context.resource : null %}

@loic425 loic425 Apr 9, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When we have this simpler code:
{% set resource = hookable_metadata.context.resource|default(null) %}

And when the resource is invalid (validation failed), the resource var is null...
That small change fixed the CI.

@TheMilek TheMilek merged commit 2731b50 into Sylius:2.1 Apr 9, 2026
36 checks passed
@loic425 loic425 deleted the fix-admin-templates branch April 9, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin AdminBundle related issues and PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants