core icon indicating copy to clipboard operation
core copied to clipboard

Selected Relationships, Categories not pushing when pushing contentlet

Open wezell opened this issue 13 years ago • 6 comments

To Reproduce on a fresh starter:

  1. Create a new "News" item
  2. Give it categories
  3. Click the "Relationships" tab and select some related media.
  4. Push this to another dotCMS server running the starter.
  5. Relationships and categories are gone on the receiving server.

http://screencast.com/t/13fvhIQbVCA

http://screencast.com/t/lPAweZ3gj

wezell avatar Jul 23 '13 15:07 wezell

@wezell where these new Categories? meaning new Categories added to the system or no?

jtesser avatar Jul 23 '13 19:07 jtesser

So the code here that should be solving this is in the DependcyManager around line 511

            Map<Relationship, List<Contentlet>> contentRel =
                    APILocator.getContentletAPI().findContentRelationships(con, user);

            for (Relationship rel : contentRel.keySet()) {
                contentsToProcess.addAll(contentRel.get(rel));
                /**
                 * ISSUE #2222: https://github.com/dotCMS/dotCMS/issues/2222
                 *
                 * We need the relationships in which the single related content is involved.
                 *
                 */
                if(contentRel.get(rel).size()>0)
                     relationships.add(rel.getInode(), rel.getModDate());
            }
        }

jtesser avatar Jul 23 '13 19:07 jtesser

nope. Standard starter categories.

dotcmsCodeReview avatar Jul 23 '13 19:07 dotcmsCodeReview

Relationships working. categories don't

dotjorgeu avatar Jul 24 '13 21:07 dotjorgeu

merged to master and master-2.5

jtesser avatar Jul 25 '13 12:07 jtesser

Fixed, tested on master 2.5

bryanboza avatar Aug 16 '13 21:08 bryanboza