Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
ViewExecutableTest::testPropertyMethods() generates a random string that is then used to test that the ViewExecutable::getUrl() method returns a URL correctly.
When the randomly generated string begins with "%/", ends with "/%", or contains "/%/" then getUrl() treats this like a placeholder and replaces it with an asterisk. Although this seems like a random enough occurrence, I've encountered it twice in one day.
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff.txt | 574 bytes | pbull |
#10 | testPropertyMethods_random_url-2409339-10.patch | 979 bytes | pbull |
#6 | interdiff.txt | 1.24 KB | pbull |
#6 | testPropertyMethods_random_url-2409339-6.patch | 1.13 KB | pbull |
#1 | testPropertyMethods_random_url-2409339-1.patch | 634 bytes | pbull |
Comments
Comment #1
pbull CreditAttribution: pbull commentedReplace "%" with "*" to prevent randomly generated URLs from containing placeholders.
Comment #2
pbull CreditAttribution: pbull commentedComment #3
dawehnerRandom test failures are critical.
Comment #4
alexpottThe randomness has no part of the test. We could just use a hard coded string
Comment #5
anavarreComment #6
pbull CreditAttribution: pbull commentedThe attached patch hard-codes the paths and view arguments.
(Alternately, the randomness could be retained with URL-safe strings by using TestBase::randomMachineName() in the place of TestBase::randomString() but I don't think this is necessary.)
Comment #9
dawehnerThank you for your work on that!
Is the random string for the title a problem?
Comment #10
pbull CreditAttribution: pbull commented@dawehner no, randomness in the titles doesn't appear to be an issue. Updated patch attached.
Comment #11
dawehnerGreat!
This looks fine for me.
Comment #12
alexpottCommitted 312aa7c and pushed to 8.0.x. Thanks!
This issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes.