Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11206

Migration issue with richtext images from other contents

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.5.3, 4.5.4, 4.6.0
    • None
    • None
    • None
    • 4.6 M2

      This script in 4.4 will list local images that were link to another content than their own

      We supposed that should not happen, but it totally can by copy/paste a richtext during edition

        const refs = Repository.query("//element(local, ametys:reference)", false)
        while (refs.hasNext())
        {
             const ref = refs.next();
          
          const contentNode = ref.getParent().getParent().getParent();
             const values = ref.getProperty("ametys:reference").getValues()
             for (const value of values)
             {
               if (!value.getString().includes("://" + contentNode.getId() + "@"))
               {
                 print (contentNode.getId() + " " + value.getString())
               }         
             }
        }

          [CMS-11206] Migration issue with richtext images from other contents

          Bérénice Maurel made changes -
          Link New: This issue Est référencé par NEWSLETTER-335 [ NEWSLETTER-335 ]
          Raphaël Franchet made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Caroline Bayle made changes -
          Fix Version/s New: 4.5.4 [ 17192 ]
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Caroline Bayle made changes -
          Status Original: Reopened [ 4 ] New: In Progress [ 3 ]
          Caroline Bayle made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

          Caroline Bayle added a comment -

          An error occurs if the distant content does not exist anymore

          Caroline Bayle added a comment - An error occurs if the distant content does not exist anymore
          Caroline Bayle made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Ready to merge [ 10208 ] New: Resolved [ 5 ]
          Caroline Bayle made changes -
          Assignee Original: Cédric Damioli [ cedric ] New: Caroline Bayle [ cbayle ]
          Caroline Bayle made changes -
          Status Original: Code review OK [ 10206 ] New: Ready to merge [ 10208 ]
          Caroline Bayle made changes -
          Status Original: Available for review [ 10005 ] New: Code review OK [ 10206 ]

            cbayle Caroline Bayle
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: