-
Notifications
You must be signed in to change notification settings - Fork 3k
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
HHVM can't render blade-templates in Laravel #2841
Comments
any chanche to reproduce? which hhvm version do you use? |
Version: 2014.06.03~trusty |
Sorry.. The version nb. is HipHop VM 3.2.0-dev+2014.06.03 (rel) |
The chances of this getting fixed increase if you submit a standalone test :) |
How to i perform and submit a standalone test ? |
@Bolandish simple php file or files, that reproduces diff php and hhvm, or jit issue |
Here is the code wich course the problem. Its the submit-button thats not being renderd. {{trans('frontend/content/login.welcome')}}@section('content') {{ Form::open(array('url' => 'login')) }} {{Form::password('password')}} {{Form::submit(trans('frontend/content/login.login'), array('class' => 'blue float_right'))}} {{ Form::close() }} |
Unfortunately we need a smaller test case in order to reproduce this. Try to dive down the code and see what exactly fails, then extract it into a simple code segment that does not depend on Laravel and shows the problem. |
I believe this is related to #2807. Here's a simple example where @extends('layouts.default')
@section('content')
{{ Form::open(array('url' => 'user/register')) }}
{{ Form::label('email', 'E-Mail Address') }}
{{ Form::text('email') }}
{{ $errors->first('email') }}
{{ Form::label('name', 'Your name') }}
{{ Form::text('name') }}
{{ $errors->first('name') }}
{{ Form::label('password', 'Password') }}
{{ Form::password('password') }}
{{ $errors->first('password') }}
{{ Form::label('password_confirmation', 'Repeat') }}
{{ Form::password('password_confirmation') }}
<div class="form-actions">
{{ Form::submit('Register', array('class' => 'btn btn-primary')) }}
</div>
{{ Form::close() }}
@stop Becomes: <?php $__env->startSection('content'); ?>
<?php echo Form::open(array('url' => 'user/register')); ?>
<?php echo Form::label('email', 'E-Mail Address'); ?>
<?php echo Form::text('email'); ?>
<?php echo $errors->first('email'); ?>
<?php echo Form::label('name', 'Your name'); ?>
<?php echo Form::text('name'); ?>
<?php echo $errors->first('name'); ?>
<?php echo Form::label('password', 'Password'); ?>
<?php echo Form::password('password'); ?>
{{ $errors->first('password') }}
<?php echo Form::label('password_confirmation', 'Repeat'); ?>
<?php echo Form::password('password_confirmation'); ?>
<div class="form-actions">
<?php echo Form::submit('Register', array('class' => 'btn btn-primary')); ?>
</div>
<?php echo Form::close(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.default', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> Behind the scenes, here's the var_dump of what gets passed to BladeCompiler parseToken function
and so expressions are being spread over 2 sections of the token_get_all arrays resulting in the following: in regular PHP land thats just a 666 character string however you can see from above it's being split into a 400 char array and a 266 char array. Any expressions caught in between 400 char arrays do not get compiled by blade. Exists on stable Laravel 4.2 |
@c0deio seems pretty accurate. Thanks for the investigation. |
@c0deio 👍 |
for reference |
|
@JoelMarcey this issue can be closed. It's fixed. Thanks @Aatch! @JoelMarcey it was indeed GMT time ;-) |
Sorry, but I'm having this issue.. Where |
Sometimes HHVM have problems with rendering blade templates in Laravel 4.2 which released sunday.
Here is an example
The text was updated successfully, but these errors were encountered: