Move terms to different vocabulary

Created on 13 September 2016, over 8 years ago
Updated 10 September 2024, 5 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
    5 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
    5 months ago
    Total: 348s
    #279662
  • Pipeline finished with Failed
    5 months ago
    Total: 557s
    #279676
  • Pipeline finished with Failed
    5 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
    5 months ago
    Total: 171s
    #279741
  • Pipeline finished with Failed
    5 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
    4 months ago
    Total: 152s
    #292465
  • Pipeline finished with Failed
    2 months ago
    Total: 171s
    #351126
  • Pipeline finished with Failed
    2 months ago
    Total: 221s
    #351151
  • Pipeline finished with Failed
    2 months ago
    Total: 159s
    #356473
  • Pipeline finished with Failed
    2 months ago
    Total: 153s
    #356489
  • 🇭🇷Croatia devad

    The latest merge patch

    https://git.drupalcode.org/project/taxonomy_manager/-/merge_requests/5.d...

    works nicely for me. Thank's a lot! You made my day!

    The only thing I noticed is that after moving the term from one vocabulary to another the automatic URL alias is not updated.

    For example... if the old URL alias was /tag/old-vocabulary/term-name, after move I would expect the URL to be tag/new-vocabulary/term-name but it remains the same.

    After I made all the term moves I needed the bulk regeneration of URL aliases did the job for me of course.

    Maybe this is an intentional behavior of course. Just posting the note here in case that it is not. :)

  • 🇯🇴Jordan oways23

    Fix an error if you left the Vocabulary empty.

  • Pipeline finished with Failed
    9 days ago
    Total: 165s
    #407273
Production build 0.71.5 2024