Forums de discussion

Error when trying to access image in activities

Shad Mortazavi, modifié il y a 13 années.

Error when trying to access image in activities

New Member Publications: 16 Date d'inscription: 11/03/11 Publications récentes
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, modifié il y a 13 années.

RE: Error when trying to access image in activities

Junior Member Publications: 53 Date d'inscription: 24/08/10 Publications récentes
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 Mortazavi, modifié il y a 13 années.

RE: Error when trying to access image in activities

New Member Publications: 16 Date d'inscription: 11/03/11 Publications récentes
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, modifié il y a 13 années.

RE: Error when trying to access image in activities

Junior Member Publications: 53 Date d'inscription: 24/08/10 Publications récentes
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 Mortazavi, modifié il y a 13 années.

RE: Error when trying to access image in activities

New Member Publications: 16 Date d'inscription: 11/03/11 Publications récentes
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, modifié il y a 13 années.

RE: Error when trying to access image in activities

Junior Member Publications: 53 Date d'inscription: 24/08/10 Publications récentes
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 Mortazavi, modifié il y a 13 années.

RE: Error when trying to access image in activities

New Member Publications: 16 Date d'inscription: 11/03/11 Publications récentes
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, modifié il y a 13 années.

RE: Error when trying to access image in activities

Junior Member Publications: 53 Date d'inscription: 24/08/10 Publications récentes
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