[wp-trac] [WordPress Trac] #60569: Generate UUID for media slugs if attachment pages are inactive.

WordPress Trac noreply at wordpress.org
Sun Jul 28 22:45:07 UTC 2024


#60569: Generate UUID for media slugs if attachment pages are inactive.
------------------------------------+-----------------------
 Reporter:  peterwilsoncc           |       Owner:  antpb
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  6.7
Component:  Media                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:
------------------------------------+-----------------------

Comment (by peterwilsoncc):

 I didn't think of the rest API testing code: as the UUID is random, the
 tests using the `tests/qunit/fixtures/wp-api-generated.js` will fail as
 the value will differ each time. This is why the tests in the linked PR
 are failing.

 Maybe this will need to use a hash of the file name instead so the value
 is consistent. It would be possible to use the file contents but as
 attachments can be quite large it's probably best avoided so WP doesn't
 need to load megabytes of data in to memory simply to get a hash.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60569#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list