Fix for Bug #8063, Share Updates links are truncated in some cases

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@146889 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2017-04-13 15:08:32 +00:00
parent 251d60adee
commit f491d286c9
5 changed files with 50 additions and 31 deletions

View File

@ -1,7 +1,8 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.shareupdates.2-3-1"
date="2017-04-06">
date="2017-04-12">
<Change>Fixes an issue where the sharing of posts in any VRE would not generate any notification in some cases, Incident #7553</Change>
<Change>Fix for Bug #8063, Share Updates links are truncated in some cases</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.shareupdates.2-3-0"
date="2017-02-20">

View File

@ -97,7 +97,7 @@
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId>
<scope>provided</scope>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>

View File

@ -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<String, String> getUserVreNames(String username) {
HashMap<String, String> toReturn = new HashMap<String, String>();
PortalContext context = PortalContext.getConfiguration();
String groupName = context.getCurrentGroupName(getThreadLocalRequest());
HashMap<String, String> toReturn = new HashMap<String, String>();
//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());

View File

@ -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

View File

@ -15,11 +15,6 @@
<url-pattern>/shareupdates/shareupdateServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>scopeService</servlet-name>
<servlet-class>org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl</servlet-class>
</servlet>
<servlet>
<servlet-name>uploadprogress</servlet-name>
<servlet-class>org.gcube.portlets.widgets.fileupload.server.UploadProgressServlet</servlet-class>
@ -30,11 +25,6 @@
<url-pattern>/shareupdates/uploadprogress</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>scopeService</servlet-name>
<url-pattern>/shareupdates/scopeService</url-pattern>
</servlet-mapping>
<!-- DO NOT CHANGE -->
<servlet>
<servlet-name>upload</servlet-name>