WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@o-psi
Copy link

@o-psi o-psi commented Oct 5, 2025

The @pure directive causes Blade compilation errors when used with Livewire Blaze due to the component containing dynamic translation helpers ({!! __() !!}) and PHP conditionals.

Error: 'Cannot end a section without first starting one'

This component cannot be safely optimized at compile-time because:

  1. It uses translation helpers that need runtime evaluation
  2. It contains PHP conditionals (if/else) for multiple file selection
  3. The dynamic wire:model attribute binding requires runtime context

Removing @pure allows the component to render correctly while still maintaining full functionality.

The @pure directive causes Blade compilation errors when used with
Livewire Blaze due to the component containing dynamic translation
helpers ({!! __() !!}) and PHP conditionals.

Error: 'Cannot end a section without first starting one'

This component cannot be safely optimized at compile-time because:
1. It uses translation helpers that need runtime evaluation
2. It contains PHP conditionals (if/else) for multiple file selection
3. The dynamic wire:model attribute binding requires runtime context

Removing @pure allows the component to render correctly while still
maintaining full functionality.
@o-psi o-psi force-pushed the fix/remove-pure-from-file-input branch from 2b2997b to 9cf2dde Compare October 5, 2025 07:13
@joshhanley joshhanley changed the title Fix: Remove @pure directive from file input component Remove @pure directive from file input component Oct 6, 2025
@joshhanley joshhanley changed the title Remove @pure directive from file input component Remove @pure directive from file input component Oct 6, 2025
@joshhanley joshhanley changed the title Remove @pure directive from file input component Remove @blaze directive from file input component Nov 3, 2025
Copy link
Member

@joshhanley joshhanley left a comment

Choose a reason for hiding this comment

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

@o-psi thanks for the PR! Ah that's a bugger. Yep makes sense to remove it to me. In future, please don't delete our PR template and actually use it. Thanks!

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