Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 18780 container error using templates from different sites #19122

Conversation

freddyucv
Copy link

@freddyucv freddyucv commented Aug 18, 2020

  • Always save absolute path to drawed template
  • When copy a site change the path from the original site to the new site as long as the copy containers option is checked
  • Update all the relative path to absolute in advanced template with a update task

@freddyucv freddyucv marked this pull request as ready for review August 24, 2020 19:35
contMap.put("path",
FileAssetContainerUtil.getInstance()
.getFullPath(FileAssetContainer.class.cast(container))
);
}

// StringBuffer containerCode = new StringBuffer( cont.getCode() );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done dotCMS/src/main/java/com/dotmarketing/util/TaskLocatorUtil.java

@@ -67,6 +67,9 @@
*/
List<Container> findContainers(User user, boolean includeArchived, Map<String,Object> params, String hostId, String inode, String identifier, String parent, int offset, int limit, String orderBy) throws DotSecurityException, DotDataException;

Container getContainerByFolderPath(String path, Host host, User user, boolean live,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javadoc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

@JsonIgnore
@NotNull
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.anyMatch(containerUUID ->
containerUUID.getIdentifier().equals(identifier) && isTheSameUUID(containerUUID.getUUID(), uuid)
);
public boolean existsContainer(final Container container, final String uuid){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javadoc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -282,6 +282,7 @@ public static void removeFixTask(Class<?> clazz){
.add(Task05300UpdateIndexNameLength.class)
.add(Task05305AddPushPublishFilterColumn.class)
.add(Task05350AddDotSaltClusterColumn.class)
.add(Task05370ChangeContainerPathToAbsolute.class)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put at the end and naming according to the last task

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erickgonzalez
Copy link
Contributor

UT Naming convention https://auth.dotcms.com/devwiki/upgrade-task-convention

@dsilvam dsilvam merged commit f4af012 into master Sep 1, 2020
@delete-merged-branch delete-merged-branch bot deleted the issue_18780_Container_error_using_templates_from_different_sites branch September 1, 2020 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants