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.
If running update.php (in-browser) and the 'user has the same email as the site email address' requirement is flagged, it prevents the update scripts from running (because any requirement warning or error does). I propose to hide this warning if running update.php.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2184049-requirement-runtime-phase.patch | 513 bytes | Dave Reid |
#1 | 2184049-requirement-runtime-phase.patch | 513 bytes | Dave Reid |
Comments
Comment #1
Dave ReidLooks like it's as simple as checking the $phase variable passed into hook_requirements(). Stuff like this should only be checked if $phase == 'runtime' as a best practice. Note that update_check_requirements() passes in 'update' so this would be skipped in that case.
Comment #2
q0rban CreditAttribution: q0rban commentedShouldn't this be if
$phase != 'runtime'
?Comment #3
Dave ReidI would say I was testing you but I just made this too quickly. My bad.
Comment #4
q0rban CreditAttribution: q0rban commentedIt seems odd that Drupal would be blocking an update from a REQUIREMENT_WARNING, since the docs specifically say that *shouldn't* be happening: https://api.drupal.org/api/drupal/includes!install.inc/constant/REQUIREM...
Comment #5
q0rban CreditAttribution: q0rban commentedEither way, I think this is a safe enough change.
Comment #6
Dave ReidIt doesn't reference what should be proceeding though. I think it's also meant to reference the installer only, looking at drupal_check_module() (which is used during install process).
Now that I take a hard look at the update.php warning, it's deceptive as well. It shows the warnings at first and only has the following text at the bottom:
To mean this means I need to resolve the warnings and re-attempt update.php, but in reality the 'try again' link actually just lets me continue the update.php script ignoring the warnings. I still think it's proper to hide this warning except when $phase == 'runtime'.
Comment #7
q0rban CreditAttribution: q0rban commentedOh interesting.
At any rate, this is fixed now. Thanks for the patch! :)
http://drupalcode.org/project/email_noreply.git/commitdiff/11f01ad9e6354...
Comment #8
q0rban CreditAttribution: q0rban commented