Automattic / themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
https://themeshaper.com
GNU General Public License v2.0
901 stars 357 forks source link

Dynamic News: functions.php has code outside PHP tags #5183

Open hideandgeek404 opened 2 years ago

hideandgeek404 commented 2 years ago

Steps to replicate

Result

The following code is now present on every page as in functions.php the PHP closing tag is on line 389 but this PHP code is on line 391-393

// updater for WordPress.com themes
if ( is_admin() )
    include dirname( __FILE__ ) . '/inc/updater.php';

image

Expected

The theme to display without the extra code

JoshuaGoode commented 2 years ago

This issue doesn't appear to be present in the most recent version we should symlink, 1.1.3

It appears that an older version 1.0.3 was installed.

HEs should use the special symlink command to ensure the proper version gets installed and symlinked.

jeherve commented 2 years ago

I ran into the same issue today when trying to install Geologist – Cream to a self-hosted site using Jetpack, via the WordPress.com themes interface.

It installed version 1.0.23 of the theme, which seems to be the latest version, but the opening PHP tag was missing from the theme's functions.php file just like above.

I see the same happening with other themes, like Geologist or Farrow.

This isn't happening on WordPress.com simple sites, since the updater doesn't need to be there. It doesn't seem to happen on WoA either.

JoshuaGoode commented 2 years ago

Looks like the opening tag was present in the v1.0.20 build of Geologist - Cream but then removed in the 1.0.23 build -- which is then served to Jetpack sites.

WoA sites, if the theme gets installed properly, utilize a symlinked version that looks proper at this time.