Opened 6 weeks ago
Closed 5 weeks ago
#66022 closed defect (bug) (fixed)
Correct Font Library and Connectors message when build files are not available
| Reported by: | afercia | Owned by: | afercia |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch has-screenshots |
| Cc: | Focuses: | ui |
Description
On the Font Library and Connectors pages, when build files are not available, a message is printed on the page. Respectively:
The Font Library requires Gutenberg build files. Please run <code>npm install</code> to build the necessary files.
and
The Connectors page requires build files. Please run <code>npm install</code> to build the necessary files.
npm installis not the correct command to build files.- The messages are inconsistent, where one refers to
Gutenberg build filesand hte other one tobuild files. I would argue the reference to Gutenberg should be omitted.
Change History (6)
This ticket was mentioned in PR #13365 on WordPress/wordpress-develop by @iamchitti.
6 weeks ago
#2
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/66022
The Font Library and Connectors screens tell the user to run npm install when build files are missing. That was correct when 61492 added a postinstall hook that built the assets; 62321 removed it and the messages were never updated. The two strings are also inconsistent — one says "Gutenberg build files", the other "build files".
## Changes
npm install→npm run buildin both messages.- Dropped the "Gutenberg" reference so both strings read consistently.
- Moved the command into a
sprintf()placeholder with a translators comment, persrc/index.php.
## Screenshots
### Font Library
| Before | After |
|---|---|
| | |
### Connectors
| Before | After |
|---|---|
| | |
## Use of AI
AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 5
Used for: Go through changesets
@afercia commented on PR #13365:
6 weeks ago
#4
@i-am-chitti thanks for exploring all the options. Personally, I'd suggest to just drop the command and use a generic sentence, because:
- The location of a linked resource may change at any time and a link to it would become broken (and unnoticed).
- The command itself may change in the future and maintaining these messages may be missed.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looked into this.
npm installwas correct when written — [61492] pointed the message at it because that changeset added apostinstallhook that built the Gutenberg assets. [62321] removedpostinstall, and the message was never updated to follow.npm run buildis the right command now.Same for "Gutenberg build files": it's an implementation detail here, and dropping it makes both messages read consistently.
I'll open a PR for this.