cancel
Showing results for 
Search instead for 
Did you mean: 

Error message when viewing a doc

xzibit12
Champ in-the-making
Champ in-the-making
I receive this error message everytime a view a certain document.

"
An error has occured in the Share component: /share/service/components/document-details/document-permissions.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 08040029 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/document-details/document-permissions.get.js': 08040028 TypeError: Cannot read property "length" from undefined (file:/opt/alfresco-4.0.d/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/document-details/document-permissions.get.js#1520)
Server: Alfresco Spring WebScripts - v1.0.0 (Release 958) schema 1,000"

Please help me solve this issue.

Alfresco v4.0.d

Thanks.
4 REPLIES 4

douglascrp
World-Class Innovator
World-Class Innovator
I receive this error message everytime a view a certain document.

"
An error has occured in the Share component: /share/service/components/document-details/document-permissions.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 08040029 Failed to execute script 'classpath*:alfresco/site-webscripts/org/alfresco/components/document-details/document-permissions.get.js': 08040028 TypeError: Cannot read property "length" from undefined (file:/opt/alfresco-4.0.d/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/document-details/document-permissions.get.js#1520)
Server: Alfresco Spring WebScripts - v1.0.0 (Release 958) schema 1,000"

Please help me solve this issue.

Alfresco v4.0.d

Thanks.

This is a know bug, unresolved until now.
You can vote and watch the Jira ticket about this here
https://issues.alfresco.com/jira/browse/ALF-12422

cbernardi
Champ in-the-making
Champ in-the-making
Hi!
To solve this problem (waiting for an offical fix) you should modify/override this share webscript: document-permissions.get.js

from

function setPermissions(documentDetails)
{
   var rawPerms = documentDetails.item.node.permissions.roles,
      permParts,
      group,
      permission;

   model.roles = rawPerms;
   model.readPermission = false;

   if (rawPerms.length > 0)
   {
……..

to

function setPermissions(documentDetails)
{
   var rawPerms = documentDetails.item.node.permissions.roles,
      permParts,
      group,
      permission;

// bug share - site - role consumer
// start fix

if (rawPerms == null || rawPerms == undefined ) {
  rawPerms = [];
}
// finish fix
//
   model.roles = rawPerms;
   model.readPermission = false;

   if ( rawPerms.length > 0)
   {

Best regards!

douglascrp
World-Class Innovator
World-Class Innovator
Hi!
To solve this problem (waiting for an offical fix) you should modify/override this share webscript: document-permissions.get.js

from

function setPermissions(documentDetails)
{
   var rawPerms = documentDetails.item.node.permissions.roles,
      permParts,
      group,
      permission;

   model.roles = rawPerms;
   model.readPermission = false;

   if (rawPerms.length > 0)
   {
……..

to

function setPermissions(documentDetails)
{
   var rawPerms = documentDetails.item.node.permissions.roles,
      permParts,
      group,
      permission;

// bug share - site - role consumer
// start fix

if (rawPerms == null || rawPerms == undefined ) {
  rawPerms = [];
}
// finish fix
//
   model.roles = rawPerms;
   model.readPermission = false;

   if ( rawPerms.length > 0)
   {

Best regards!

Hi.

I tried this workaround here and it's working.

Thanks for sharing.

roger
Champ in-the-making
Champ in-the-making
Hi!
To solve this problem (waiting for an offical fix) you should modify/override this share webscript: document-permissions.get.js

from

function setPermissions(documentDetails)
{
   var rawPerms = documentDetails.item.node.permissions.roles,
      permParts,
      group,
      permission;

   model.roles = rawPerms;
   model.readPermission = false;

   if (rawPerms.length > 0)
   {
……..

to

function setPermissions(documentDetails)
{
   var rawPerms = documentDetails.item.node.permissions.roles,
      permParts,
      group,
      permission;

// bug share - site - role consumer
// start fix

if (rawPerms == null || rawPerms == undefined ) {
  rawPerms = [];
}
// finish fix
//
   model.roles = rawPerms;
   model.readPermission = false;

   if ( rawPerms.length > 0)
   {

Best regards!

That worked like a charm!!

Thank you so much cbernardi
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.