[wp-trac] [WordPress Trac] #39767: wp-admin failures upon line breaks in functions.php

WordPress Trac noreply at wordpress.org
Thu Feb 2 11:40:04 UTC 2017


#39767: wp-admin failures upon line breaks in functions.php
-------------------------+-----------------------------
 Reporter:  gregvie      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Customize    |    Version:  4.7.2
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Building a '''child theme''' I came accross something I'd consider a bug:

 In wp-admin the media editor for image resizing & cropping didn't load
 preview images and failed to edit uploaded images. I did some research on
 the web and found a forum posting (on some site) pointing out an issue
 that occures when there are '''line breaks or spaces''' between closing
 and opening PHP tags (''"...?> \n <?php..."'') in '''functions.php''' or
 any required / included php-files (in my case a file called classes.php
 which is required in functions.php ending with two line breaks after the
 final closing ?>). Only after eliminating those line breaks / spaces my
 child theme's media editor (for resizing & cropping) worked again.

 It would be some enhancement fixing this bug and saving developers who are
 not aware of that issue lots and lots of time researching and finding the
 solution.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39767>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list