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 have huge vocabulary - about 35000 terms.
And when i make simple operation of changing term's weight, my script goes into timeout.
It happens because of taxonomy_term_save() call in taxonomy_manager_update_weights() function.
When i fall deeper, i found that pathauto module implements hook_taxonomy_term_update() and update aliases for ALL children of terms. Evident that this operation could not be completed - when we move top level term, aliases of 35000 terms updated...
I think we could make a workaround for that case and don't update aliases on weight changing.
See patch.
Comment | File | Size | Author |
---|---|---|---|
7.x-1.0-rc1-fix-huge-children-update.patch | 836 bytes | IRuslan |
Comments
Comment #1
mh86 CreditAttribution: mh86 commentedHi Ruslan,
thanks for reporting the problem.
taxonomy_term_save() is called on multiple places, and is not specific to the Taxonomy Manager. So I think this problem needs to be address in the pathauto module.
Comment #2
IRuslan CreditAttribution: IRuslan commentedI think pathauto is just do it's own work - update content aliases by pattern. And there is a thousands of terms we get timeout.
May be we could have some option in taxonomy manager module to switch save mode: raw update or taxonomy_term_save() call.