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

LPS-31834 Fix export/import repositories #8357

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -35,6 +35,7 @@
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.kernel.xml.Attribute;
import com.liferay.portal.kernel.xml.Element;
import com.liferay.portal.kernel.zip.ZipReader;
import com.liferay.portal.kernel.zip.ZipWriter;
Expand Down Expand Up @@ -847,11 +848,11 @@ public InputStream getZipEntryAsInputStream(String path) {
public Object getZipEntryAsObject(Element element, String path) {
Object object = fromXML(getZipEntryAsString(path));

Element classNameElement = element.element("class-name");
Attribute classNameAttribute = element.attribute("class-name");

if (classNameElement != null) {
if (classNameAttribute != null) {
BeanPropertiesUtil.setProperty(
object, "className", classNameElement.getText());
object, "className", classNameAttribute.getText());
}

return object;
Expand Down
Expand Up @@ -307,6 +307,9 @@ else if (((folderId != rootFolderId) && (parentFolderId == 0)) || ((folderId ==
<%
}
catch (Exception e) {
if (_log.isWarnEnabled()) {
_log.warn("Error trying to access repository", e);
}
%>

<li class="app-view-navigation-entry folder error" title="<%= LanguageUtil.get(pageContext, "an-unexpected-error-occurred-while-connecting-to-the-repository") %>">
Expand Down Expand Up @@ -440,4 +443,8 @@ else if (((folderId != rootFolderId) && (parentFolderId == 0)) || ((folderId ==
}
);
</aui:script>
</liferay-ui:app-view-navigation>
</liferay-ui:app-view-navigation>

<%!
private static Log _log = LogFactoryUtil.getLog("portal-web.docroot.html.portlet.document_library.view_folders_jsp");
%>