I have some problem with Blade engine.There ara display differences in rendering between Blade output and "pure" template. I put screenshots from Chrome:
Without using Blade (everything is ok):
http://i.imgur.com/Cy7cFTA.png
With Blade:
http://i.imgur.com/wSr4iGX.png
On the top is fragment of bookmarks bar. As you can see, on second screen there is some white space on the top of page. And there are some differences in table displaying. But it's not all - in developer console everything from head sections now is on the top of body section (only on Blade rendering).
After tag there's some white space in brackets in many lines, which occours after rendering and below as I told properties from head section.
Some notes from debugging - please, read it:
on every browser problem occours (Chrome, Firefox, IE)
there's UTF-8 encoding without BOM. To be sure, I converted every file of template.
on another templates / simple html pages this same problem
I switched application mode (dev / prod), but nothing changes
in app config encoding is of course UTF-8
I installed Laravel in another place - this same problem
there's no additional pluggins installed
Windows 7, Apache
pure HTML files hosted on server, requests made using server, not as local files (http://.. instead of file://..)
And another problem, maybe connected with this - Artisan - below copy of text from console:
"C:\STRONY\studiobazyli>php artisan
´╗┐´╗┐´╗┐´╗┐´╗┐´╗┐´╗┐´╗┐´╗┐´╗┐´╗┐Laravel Framework version 4.2.8
Usage:..."
As you can see output from artisan simple running starts with strange characters. This same on another commands (migrations etc.). It looks there are encoding problems.
Related
In a Laravel Nova application i've got a strange issue: Whenever i try to download a file i have a linefeed char on the first line (0A, an empty line). This corrupts images, zip-files and so on. But what is causing this?
I've tried/checked:
Check all php files on closing tags (there are none)
Original file on hdd does not have this extra linefeed when it's created
Checked every php file since last release for correct UTF-8 encoding
Copied composer.lock from live server and installed everything again
Ran composer dump, php artisan cache:clear, php artisan clear-compiled
Checked all code changes since the last release (where there was no issue)
Tried Chrome and Firefox
Here's some Laravel Nova code that produced this error:
return Fields\Image::make(__('Image')), 'imageStorage')
->rules('image', "dimensions:max_width={$image_max_width},max_height={$image_max_height}")
->squared()
->disk(Enums\StorageDisk::APP_PUBLIC_DISTRIBUTORS)
->path(DistributorPath::products($distributorId))
->deletable(false)
->prunable()
->onlyOnForms();
First charachter is always 0A.
So, how do i find the cause? Any tips or strategy?
Short answer: the linebreak was hiding in a routes file.
This mistake was made almost a year ago and never surfaced until now, because it was no issue in any of the output the application created (html / xml). Started to be a problem when I tried to output binary files (zip / images).
So how did i find this bug? die('find bug!');
For anyone in the future:
Start at index.php
Place die('find bug!'); at one place and test.
Don't be afraid to place it in vendor or library code.
No linebreak? Remove die('find bug!'); and place it in the next call.
Found the linebreak? So now you now the linebreak is somewhere inbetween.
Zoom in and find it!
I got a weired behavior on my apache, php setup on debian system.
I tried to create an image with php and output it directly. It failed permanent and the browser said sth. like corrupt image file. After a lot of try and error arroun 3 hours I figured out that there is a TAB character added right at the beginning ob my image content, that does not belong there.
To proove that its part of the apache-php setup I created a test.php file, that just contains the letter 'a' and coppied this file to test.html. So Both files just contain the letter a.
You can see the resulting tab here:
http://www.activeroom.net/test.php
http://www.activeroom.net/test.html
and even on the base url itself - its a php-file, too.
Hope anybody can point me in the correct direction. Btw. on the console everything is fine: php test.php just returns an a. Maybe it is something about the Apache MimeTypes or headers?!
How stupid - there was a php-file prepended through the php.ini. That file had a tab at the end. Sometimes things are really messed up.
I have an application and its working locally perfect.
on production, all pages are fine which haven't redirection.
Its connected with database because data showing on list pages
I have checked controllers/models for starting and ending code (spaces removed and closing PHP tag removed)
I checked permissions (all folders are 755 and tmp is 777)
I updated debug value to 2,3 but not showing any thing
I checked using PR few variables and in view source it shows few spaces (didn't get any clue that from where the spaces are embedding)
Also, I have uploaded fresh copy of lib/Cake
One another project in same version of Cake is already deployed and working perfectly (Prefix changed for both projects)
On redirection, it shows a blank page. I checked view source of this blank page and it contains 32 spaces.
Any Clue why its happening or from where I need to remove these spaces?
Issue fixed.
Because it was issue of IDE.
I am using sublime but same Dreamweaver have same issue.
For Sublime, we can load a package : https://github.com/SublimeText/TrailingSpaces
For Dreamweaver, we need to do manually by search and replace.
for more details : http://www.jaredstenquist.com/2009/02/13/removing-extra-linebreaks-and-spaces-in-dreamweaver/
Thanks
I'have instaled codesleeve/asset-pipeline and use command php artisan assets:update
got no errors, but when I load the page an in my chrome developer tools go to Network tab there is jQuery-1.10.2.min.map 404 not found
could please someone tell me if I forgot to do something?
Normally, a minimized source file will be unreadable since all the whitespace & comments are removed. The .min.map file allows the client to "rebuild" the original source for the purposes of browsing & debugging. Thus, if you want/need to debug jQuery, you might want to get that file.
If that file is missing, your application should still work properly. So, the short answer to your question is "no, you didn't forget anything". You can safely ignore that warning.
I'm working locally on a Magento install, when I try to upload the sources to the production server it starts happening something very frustrating: the homepage output is not complete, I only see a section of the page instead of seeing the whole page.
I zipped the local copy and transferred using scp so I don't think it can be some missing file, the only thing I updated was the media directory, but from what I know it has to do with media assets, not with templates... I uploaded the source several times, and nothing...
Also the DB is the same copy, so it cannot be an issue.
The output HTML is different (and for instance it's also missing the closing body and html tags.
What can be wrong?
Try this:
http://www.magentocommerce.com/_media/magento-check.zip
http://www.magentocommerce.com/system-requirements
Since the only difference is the server you need to make sure it has all those pre-requisites checked.