Forums

Home » Liferay Social Office

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sadi Mort
Error when trying to access image in activities
March 10, 2011 7:47 PM
Answer

Sadi Mort

Rank: New Member

Posts: 16

Join Date: March 10, 2011

Recent Posts

Dear Team,

I am using Social Office version 1.5b. Everything is working well with the exception of the following component.

I add a site, I configure the the welcome component of the site. As part of this I upload an image. I get a notification in the activities telling me that the image has been uploaded.

When I click on the 'Go To Folder' I get;

The requested resource was not found.

http://bla.bla.com:8080/c/image_gallery/find_folder?folderId=11747

When I look in the log file I get;

WARN [PortalImpl:3112] Current URL /c/image_gallery/find_image?imageId=11756 generates exception: No page was found with the Image Gallery portlet.

My environment is CentOS 5.4, Social Office 1.5 and MySQL.

Many Thanks....
Nick Willey
RE: Error when trying to access image in activities
March 11, 2011 11:46 AM
Answer

Nick Willey

Rank: Junior Member

Posts: 53

Join Date: August 24, 2010

Recent Posts

Social Office does not come with the image gallery setup on any pages. You would have to create a new page on one of your sites and add the image gallery portlet to it. Unfortunately, there is limited flexibility with SO1.5b out of the box and several customizations are required to achieve this result.

The next version of Social Office (as yet unreleased) seems to make this a bit easier, at least judging from the code in svn.

Nick
Sadi Mort
RE: Error when trying to access image in activities
March 11, 2011 2:43 PM
Answer

Sadi Mort

Rank: New Member

Posts: 16

Join Date: March 10, 2011

Recent Posts

Hi Thanks for the response.

I think you may have misunderstood my question. I am not trying to add or customize Open Office. I want to use it as is.

When you add a picture in Social Office (for example when writing a Welcome message using the WYSIWYG) on a new site, it create an entry in the Activity Log on the home page with a link.

Its when you click on the link that the error message comes up.

Can I either fix the error or can i suppress this particular notification in the activity log?

Many Thanks
Nick Willey
RE: Error when trying to access image in activities
March 11, 2011 3:02 PM
Answer

Nick Willey

Rank: Junior Member

Posts: 53

Join Date: August 24, 2010

Recent Posts

This is one of the oversights in SO. Certain portlets make use of the Image Gallery to store images. Unfortunately, Social Office out of the box does not include the interface to the Image Gallery portlet on any of the sites you create. You can however access it through the Control Panel, not that this helps your users who may be clicking on the link in the Activities feed, as you've experienced.

Basically your options are to not include images that get placed in the image gallery, customize Social Office to do what you need, or wait until the next version. It's not extremely difficult to do what you want, really only requires the editing of some jsp's.

Nick
Sadi Mort
RE: Error when trying to access image in activities
March 11, 2011 3:10 PM
Answer

Sadi Mort

Rank: New Member

Posts: 16

Join Date: March 10, 2011

Recent Posts

Thanks Nick.

In this instance; I would like to suppress the notification or deactivate the link. Could you let me know which JSPs I should be looking at?

Many Thanks,

S
Nick Willey
RE: Error when trying to access image in activities
March 11, 2011 5:10 PM
Answer

Nick Willey

Rank: Junior Member

Posts: 53

Join Date: August 24, 2010

Recent Posts

In this instance, I'm not sure which jsp's you would modify, or if you can achieve what you want with only modifying jsp's. What I've done in my setup is modified the social.xml file located in the custom-sql directory of webapps\ROOT\WEB-INF\lib\portal-impl.jar. You'll need to extract the social.xml file, make the necessary changes, then add the file back to the jar.

The changes you need to make to social.xml are in the section with the following sql id's:

com.liferay.portlet.social.service.persistence.SocialActivityFinder.countByRelationType
com.liferay.portlet.social.service.persistence.SocialActivityFinder.countByUserGroups
com.liferay.portlet.social.service.persistence.SocialActivityFinder.findByGroupId
com.liferay.portlet.social.service.persistence.SocialActivityFinder.findByGroupUsers
com.liferay.portlet.social.service.persistence.SocialActivityFinder.findByRelation
com.liferay.portlet.social.service.persistence.SocialActivityFinder.findByRelationType
com.liferay.portlet.social.service.persistence.SocialActivityFinder.findByUserGroups

In each of these sql statements, you want to ammend the WHERE clause adding:

(SocialActivity.classNameId != 10010)

This is a very crude fix, and be sure to document it well as a future upgrade will certainly break it! If there is a way to achieve the same result through list sorting in a jsp I'd be greatful to hear about it.

Nick
Sadi Mort
RE: Error when trying to access image in activities
March 11, 2011 11:04 PM
Answer

Sadi Mort

Rank: New Member

Posts: 16

Join Date: March 10, 2011

Recent Posts

Nick,

Thank you for the information this helped me resolve the issue.

The syntax in my case was;

(SocialActivity.classNameId != 10066)

Many Thanks,

S
Nick Willey
RE: Error when trying to access image in activities
March 12, 2011 6:56 AM
Answer

Nick Willey

Rank: Junior Member

Posts: 53

Join Date: August 24, 2010

Recent Posts

Glad to help. Obviously I didn't look far enough down the list of classId's, sorry about that! It would be nice if this was configurable through the portlet.xml file, or better yes a nice interface in the control panel!

Nick