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.
Problem/Motivation
When run drush xmlsitemap-rebuild
with no rebuildable link types, the drush command output an ERROR (stderr) No link types are rebuildable. [Error]
.
This kind of message make sense to be an simple WARNING, because there are no errors during the sitemap generation, just a message describing that there are no links to be rebuildable.
This error could interrupt the execution of some CI process (my case)
Proposed resolution
Change "drush_set_error" to "drush_log".
- return drush_set_error(dt('No link types are rebuildable.'));
+ return drush_log(dt('No link types are rebuildable.'), 'warning');
Comment | File | Size | Author |
---|---|---|---|
#10 | xmlsitemap-output-warning-2675490-10.patch | 1.13 KB | pifagor |
| |||
#2 | xmlsitemap-output-warning-2675490-d7.patch | 791 bytes | jribeiro |
|
Comments
Comment #2
jribeiro CreditAttribution: jribeiro at CI&T for Pfizer, Inc. commentedComment #3
Chris Matthews CreditAttribution: Chris Matthews commentedThe 3 year old patch in #2 to xmlsitemap.drush.inc applied cleanly to the latest xmlsitemap 7.x-2.x-dev and is a valid and reasonable change.
Comment #4
pifagorComment #6
pifagorComment #8
Dave ReidLikely needs to be adjusted for 8.x-1.x as well.
Comment #9
pifagorComment #10
pifagorComment #11
alex_optimGood for me.
Comment #12
pifagorComment #14
pifagor