Make WordPress Core

Opened 9 months ago

Closed 8 months ago

Last modified 8 months ago

#60337 closed defect (bug) (fixed)

Installing custom fonts genereates untracked 'fonts' directory

Reported by: afercia's profile afercia Owned by: swissspidy's profile swissspidy
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch needs-dev-note
Focuses: Cc:

Description

When developing on trunk and installing custom fonts (e.g. Google fonts) in the editor, a new /src/wp-content/fonts/ directory is generated.

The git status comannd will report:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	src/wp-content/fonts/

Similarly for SVN.

This directory should either svn ignored and git ignored or committed to core.

Change History (7)

#1 @ironprogrammer
8 months ago

Thanks for the report, @afercia!

This .gitignore update is being tracked in #59166 (specifically) as part of the Font Library feature.

It's not exactly a dupe, so I'm unsure how best to track or close this going forward. CC @mikachan @hellofromTonya.

#2 @afercia
8 months ago

Thanks @ironprogrammer

Together with @poena and @SergeyBiryukov we were thinking the generated fonts directory would likely be reported by security plugins as a security issue. One one hand this could be addressed with a deev note informing plugin authors to update their rules. On the other hand, wouldn't be simpler to just commit the fonts directory so that it's part of a default installation even if empty?

#3 @swissspidy
8 months ago

  • Keywords has-patch added

See https://github.com/WordPress/wordpress-develop/pull/5190 for a patch

Svn ignore needs to he updated top

#4 @swissspidy
8 months ago

On the other hand, wouldn't be simpler to just commit the fonts directory so that it's part of a default installation even if empty?

wp-content/uploads or wp-content/upgrade are not part of the default installation either and only created when needed.

#5 @swissspidy
8 months ago

  • Owner set to swissspidy
  • Resolution set to fixed
  • Status changed from new to closed

In 57640:

Build/Test Tools: Ignore src/wp-content/fonts from version control.

Props ironprogrammer, afercia.
Fixes #60337.

#6 @afercia
8 months ago

  • Keywords needs-dev-note added

wp-content/uploads or wp-content/upgrade are not part of the default installation either and only created when needed.

Right, thanks @swissspidy. Then I'd say a dev-note is worth it to inform plugin authors a new fonts directory may be generated at some point.

#7 @swissspidy
8 months ago

This can be added to the general fonts library dev-note for sure. cc @mmaattiiaass

Note: See TracTickets for help on using tickets.