-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Image upload giving obscure error #2027
Comments
Let me guess:
preg_replace_callback at line 133 matches on line 168
Which returns Field will now be 'toStringed' by php to match the return type of the I'm guessing you were already at that point? Now on And
I'm suspecting |
Yes, I think that's exactly what happens! :-) |
Ah, i found it!! We recently added this: https://github.com/bolt/redactor/blob/master/src/Controller/Upload.php#L110 Only now it tries to access the config after uploading, and then when it reconstructs the request, it's not working! |
I saw resetting the $_FILES suggested as a 'fix' here laravel/framework#12350 (comment) -- feels wrong to me, put might work. Hope you can come up with a nicer solution. |
@bobdenotter can this be closed then, after the fixes in redactor and article? |
Kinda! I worked around it, with @simongroenewolt 's nasty hack, but it's not fixed per se. The problem is in us using So, it's less urgent than i assumed it was, but ideally we'd fix it properly. |
I took another look at the code, it looks like the real solution would be to rework where the logic that decides on rendering 'as' twig or not is placed. To me it looks like it is too far down in the Field class at the moment. The solution should probably not be to bring the $request to the field, but to move the decision on how to render 'up'. I noticed the Content class is used to pass a reference to the twig environment to the field while not using it itself. Also the field itself doing the RequestZone::isForFrontend() check feels a bit out-of-place to me. I'm a bit stuck at the @bobdenotter / @I-Valchev If you are interested I'd be happy to dig a bit further, but maybe you just want to leave this for now as and spend time elsewhere. |
See screenshot:
I can be "fixed" by changing Field.php:
Which is a terrible fix. So we should find out what's actually happening, and fix that.
The text was updated successfully, but these errors were encountered: