Move terms to different vocabulary

Created on 13 September 2016, about 8 years ago
Updated 11 September 2024, 2 months ago

Hello

Here Just a basic move operation, without keep parents.
It is not perfect but permit to move term to another vocabularies.

📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇫🇷France egruel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Merge request !5Issue #2799359: Move operation → (Open) created by dustinleblanc
  • 🇫🇮Finland sokru

    Needs at least reroll. Also this would greatly benefit from tests. The validation doesn't seem to take into account that some vocabulary might be translatable and other not and moving translated term to non-translatable vocabulary probably causes errors.

  • First commit to issue fork.
  • 🇺🇸United States jsutta United States

    I rebased the issue's merge request against the current 2.0.x branch and readded the changes from #27. A patch generated from the merge request applies cleanly against the latest release in my environment.

  • Pipeline finished with Failed
    2 months ago
    Total: 157s
    #279511
  • 🇺🇸United States torfj Seattle, WA

    Patch also applied cleanly for me and moving terms within a taxonomy seems to be working well. However, when I tried enable the option to 'Keep old parents and add new ones' I get this error:

    Error: Call to undefined method Drupal\taxonomy\Entity\Vocabulary::setHierarchy() in Drupal\taxonomy_manager\Form\MoveTermsForm->submitForm() (line 188 of /opt/drupal/web/modules/contrib/taxonomy_manager/src/Form/MoveTermsForm.php).
    
  • Pipeline finished with Failed
    2 months ago
    Total: 348s
    #279662
  • Pipeline finished with Failed
    2 months ago
    Total: 557s
    #279676
  • Pipeline finished with Failed
    2 months ago
    Total: 176s
    #279730
  • 🇺🇸United States torfj Seattle, WA

    Linted the code and added a validation check to ensure only one vocabulary is selected.

    I think it might also be necessary to add an access check before moving terms across vocabularies to confirm that the user has both delete term permissions in source and create term permissions in destination.

  • Pipeline finished with Failed
    2 months ago
    Total: 171s
    #279741
  • Pipeline finished with Failed
    2 months ago
    Total: 168s
    #279748
  • 🇺🇸United States jsutta United States

    The latest commits apply cleanly and work on my end. Thank you @torfj!

  • 🇺🇸United States jsutta United States
  • Pipeline finished with Failed
    about 2 months ago
    Total: 152s
    #292465
Production build 0.71.5 2024