diff --git a/distro/changelog.xml b/distro/changelog.xml index 1eeb1c7..063c23b 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,7 +1,8 @@ + date="2017-04-12"> Fixes an issue where the sharing of posts in any VRE would not generate any notification in some cases, Incident #7553 + Fix for Bug #8063, Share Updates links are truncated in some cases diff --git a/pom.xml b/pom.xml index d5ac997..a05d20e 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,7 @@ org.gcube.core common-scope-maps - provided + compile org.gcube.portlets.widgets diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java b/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java index 926ea6f..f366774 100644 --- a/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java @@ -158,7 +158,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar urlThumbnail = FilePreviewer.saveThumbnailOnFTPAndGetUrl(urlThumbnail, context.getCurrentScope(getThreadLocalRequest())); Date feedDate = new Date(); - + //get the VRE scope if single channel post String vreScope2Set = ""; if (pLevel == PrivacyLevel.SINGLE_VRE && vreOrgId != null) { @@ -745,7 +745,6 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar //try openGraph First OpenGraph ogLink = null; try { - System.out.println("linkToCheck=" + linkToCheck); ogLink = new OpenGraph(linkToCheck, true, siteConnection); if (ogLink == null || ogLink.getContent("title") == null) { //there is no OpenGraph for this link @@ -786,9 +785,16 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar * @return the id as key and the names as value of the vre a user is subscribed to */ private HashMap getUserVreNames(String username) { + HashMap toReturn = new HashMap(); PortalContext context = PortalContext.getConfiguration(); String groupName = context.getCurrentGroupName(getThreadLocalRequest()); - HashMap toReturn = new HashMap(); + + //for dev + if (!isWithinPortal()) { + toReturn.put(""+context.getCurrentGroupId(getThreadLocalRequest()), groupName); + return toReturn; + } + for (GCubeGroup vre : getUserVREs(username)) { if (vre.getGroupName().compareTo(groupName)==0) toReturn.put(vre.getGroupId()+"", vre.getGroupName()); diff --git a/src/main/resources/clientlog4j.properties b/src/main/resources/clientlog4j.properties index fd367a5..03ab7ba 100644 --- a/src/main/resources/clientlog4j.properties +++ b/src/main/resources/clientlog4j.properties @@ -1,18 +1,40 @@ -log4j.rootLogger=DEBUG, A1 -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout +# gCube Portal custom log4j Logger +#Author: Massimiliano Assante, ISTI-CNR -# Print the date in ISO 8601 format -log4j.appender.A1.layout.ConversionPattern=%d %-5p %c - %m%n +log4j.rootLogger=INFO, CA -# Print only messages of level TRACE or above in the package org.gcube -log4j.logger.org.gcube=TRACE -log4j.logger.org.gcube.application.framework.core.session=INFO -log4j.logger.org.gcube.contentmanager=ERROR -log4j.logger.org.gcube.common.scope=ERROR -log4j.logger.org.gcube.contentmanagement=ERROR -log4j.logger.org.gcube.resources.discovery.icclient=ERROR -log4j.logger.org.gcube.common.clients=ERROR -log4j.logger.org.gcube.common.homelibrary.jcr=ERROR -log4j.logger.org.gcube.application.framework.accesslogger=ERROR -log4j.logger.org.apache.pdfbox.util.PDFStreamEngine=ERROR +log4j.appender.CA=org.apache.log4j.ConsoleAppender + +log4j.appender.CA.layout=org.apache.log4j.PatternLayout +log4j.appender.CA.layout.ConversionPattern=[PORTAL] %-4r [%t] %-5p %c %x - %m%n + +# Display any warnings generated by our code +#log4j.category.org.globus=WARN + +# Comment out the line below if you want to log every authorization +# decision the notification consumer makes. +#log4j.category.org.globus.wsrf.impl.security.authorization.ServiceAuthorizationChain=ERROR + +log4j.logger.org.gcube=TRACE, GCUBE +log4j.appender.GCUBE.threshold=DEBUG +log4j.appender.GCUBE=org.apache.log4j.ConsoleAppender +log4j.appender.GCUBE.layout=org.apache.log4j.PatternLayout +log4j.appender.GCUBE.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] % +m%n + +log4j.logger.org.apache.jasper.compiler.TldLocationsCache.level=ERROR, CA +#AVOID LOGGING EHCACHE Hearbeat problem +log4j.logger.net.sf.ehcache.distribution.PayloadUtil=OFF, CA + +log4j.logger.org.gcube.portal.notifications=INFO, CA +log4j.logger.org.gcube.common.scope.impl=INFO, CA +log4j.logger.org.gcube.common.core.utils.events=INFO, CA +log4j.logger.org.gcube.portlets.user.homelibrary=INFO CA +log4j.logger.org.gcube.common.resources.kxml=ERROR, CA +log4j.logger.org.gcube.application.aquamaps.enhabling.Impl.ISCrawler=ERROR, CA +log4j.logger.com.netflix.astyanax.connectionpool.impl=ERROR, CA +log4j.logger.org.gcube.common.scope.impl=INFO, CA +log4j.logger.com.couchbase.client=ERROR, CA +log4j.logger.org.gcube.smartgears.handlers=INFO, CA +log4j.logger.org.gcube.informationsystem.publisher=INFO, CA +log4j.logger.org.gcube.application.framework.core.session=INFO, CA diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 102290f..190aa2b 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -15,11 +15,6 @@ /shareupdates/shareupdateServlet - - scopeService - org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl - - uploadprogress org.gcube.portlets.widgets.fileupload.server.UploadProgressServlet @@ -30,11 +25,6 @@ /shareupdates/uploadprogress - - scopeService - /shareupdates/scopeService - - upload