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.
I think it would be beneficial to have a hook_alter in the ajax callback, so that other modules can tap into the fact that the weight has been updated.
For example, if you are uisng third party storage (let's say, SOLR and search_api), you would want to reindex the node when the weight is changed. On other weight_set_weight calls, you already have hooks that can tap into the data (node insert & update), but for the ajax, we currently have no way for other modules to know about the weight change.
Will apply patch and an example of usage in a short while.
Comment | File | Size | Author |
---|---|---|---|
#2 | hook_weight_set_ajax_alter-2313817-1.patch | 365 bytes | thehideki |
Comments
Comment #1
thehideki CreditAttribution: thehideki commentedEDIT: Edited the usage for actual Search Api integration
Example usage:
Comment #2
thehideki CreditAttribution: thehideki commentedComment #4
davisbenCommitted. Thanks for the patch!