Daily Log for #alfresco IRC Channel

Alfresco discussion and collaboration. Stick around a few hours after asking a question.

Official support for Enterprise subscribers: support.alfresco.com.

Joining the Channel:

Join in the conversation by getting an IRC client and connecting to #alfresco at Freenode. Our you can use the IRC web chat.

More information about the channel is in the wiki.

Getting Help

More help is available in this list of resources.

Daily Log for #alfresco

2016-12-05 07:17:59 GMT *** sujaypillai_ is now known as sujaypillai

2016-12-05 07:48:39 GMT <twen> 'morning

2016-12-05 08:35:58 GMT <fcorti> Good morning

2016-12-05 08:36:03 GMT <yregaieg> Morning

2016-12-05 10:29:57 GMT *** marsv024_ is now known as marsv024

2016-12-05 11:22:57 GMT *** marsv024_ is now known as marsv024

2016-12-05 11:27:59 GMT <douglascrp> good morning

2016-12-05 12:13:44 GMT <qwebirc26418> Hola! Someone here who knows well about creating new permissions?

2016-12-05 12:27:32 GMT <AxelFaust> qwebirc26418: Yes - although creating new permissions is the simplest part - making them work and interacting with default permissions is typically a very complex scenario

2016-12-05 12:31:22 GMT <qwebirc26418> AxelFaust: Yes, my issue is that it seems that new permissions (and roles) will not be applied to existing Sites, right? I got a "An Authority was not found for GROUP_site_mytestsite_WebPublisher" exception. But it works well for new sites. Do I have to create a migration for existing sites?

2016-12-05 12:33:26 GMT <Xen_> hi all i created a workflow that when approved it converts the current document to a pdf and move it to a folder, our server crashed so im doing it exactly over like the previous one but i keep on getting this error when a try approve or reject the workflow: org.activiti.engine.ActivitiException: Unknown property used in expression: ${wf_reviewOutcome == 'Approve'}

2016-12-05 12:34:01 GMT <Xen_> this is my workflow: http://pastebin.com/zeLaUNCh

2016-12-05 12:34:02 GMT <alfbot> Title: Custom Workflow - Pastebin.com (at pastebin.com)

2016-12-05 12:34:26 GMT <AxelFaust> qwebirc26418: If you create custom site permissions after a site has already been created then yes, that is a problem.

2016-12-05 12:34:30 GMT <Xen_> i cant seem to find the issue as this is a clean backup .......

2016-12-05 12:34:45 GMT <AxelFaust> The permissions are used to create the necessary role groups upon site creation and will not be revisited afterwards.

2016-12-05 12:35:32 GMT <qwebirc26418> AxelFaust: Thank you, so I just need to add a javascript that will apply my new custom site permission to all existing sites...

2016-12-05 12:36:15 GMT <AxelFaust> Xen_: Independant of the current issue: You should probably look into building your customizations using a source controlled build project, e.g. as Alfresco modules using the Alfresco SDK. That way you don't just have your customizations / workflows on the server and loose them when it crashes...

2016-12-05 12:38:09 GMT <AxelFaust> Xen_: As to your problem - the "complete" task listener that transfers the wf_reviewOutcome variable is on the wrong userTask element. It should be on the "reviewTask"

2016-12-05 12:39:36 GMT <AxelFaust> qwebirc26418: It is not as simple as that. The script basically has to go through each site, delete + recreate the site role groups, go through each folder / document already created + check applied permissions + transfer already set permissions to the new groups if they end up with different names

2016-12-05 12:43:43 GMT <IanW1> It's strange how the discussions on here keep relating to things I've just found... https://issues.alfresco.com/jira/browse/ALF-21793

2016-12-05 12:45:46 GMT <qwebirc26418> AxelFaust: Holy shit! But assuming, my permission should not be applied to any existing document of a site folder automatically (=will be done later manually by a SiteManager) then it should be just enough to delete + recreate the Site's role groups without checking each folder + document?

2016-12-05 12:46:17 GMT <AFaust> ~tell yreg: If I saw that correctly, the ghosting did not really work early this afternoon when I got disconnected because of taking my mobile hotspot with me to the coffee station.

2016-12-05 12:46:17 GMT <alfbot> AFaust: Error: 'yreg:' is not a valid nick.

2016-12-05 12:46:24 GMT <AFaust> ~tell yreg If I saw that correctly, the ghosting did not really work early this afternoon when I got disconnected because of taking my mobile hotspot with me to the coffee station.

2016-12-05 12:46:24 GMT <alfbot> AFaust: The operation succeeded.

2016-12-05 12:47:38 GMT <AFaust> qwebirc26418: You would at least have to handle the site containers (documentLibrary, wiki et al) depending on the site visibility

2016-12-05 12:47:48 GMT <AFaust> as well as the root permissions on the site itself

2016-12-05 12:49:26 GMT <AFaust> Also be aware that various functionality in Alfresco is sort of hard-coded to some of the default site role groups. So when your custom permissions do not include some of the default ones (especially SiteManager) then you will likely see some features not working as expected

2016-12-05 12:52:22 GMT <qwebirc26418> AFaust: ok, I dont want to touch the SiteManager at all, just need a custom "Publish" permission for an action in the folder-actions-menu. Hope it can be done with your advice and without touching billions of documents...

2016-12-05 12:52:33 GMT <yreg> AFaust, Yes, for some odd reasons, IRC server seems to catch the /nick command BEFORE the /ghost command sometimes even though IRC should be using TCP and not UDP...

2016-12-05 12:53:32 GMT <AFaust> qwebirc26418: If you really "just" add a new permission and have kept the old ones as-is, then you actually really only have to create the missing site role group

2016-12-05 12:55:40 GMT <qwebirc26418> AFaust: That sounds more promising... :-) I'll give it a try and if it fails, I'll came back to you :-P

2016-12-05 12:59:37 GMT <Tichodroma> how can I change the primary path of a node using the Java services? I've tried FileFolderService.rename and .move without any effect.

2016-12-05 13:00:59 GMT <Tichodroma> backgroud: I've nodes with identical primary names caused by the bug described in https://issues.alfresco.com/jira/browse/MNT-11909

2016-12-05 13:01:20 GMT <AFaust> Tichodroma: both rename and move should be the proper operations for that - any operation that internally uses NodeService.moveNode affects the primary path

2016-12-05 13:01:47 GMT <AFaust> Though I usually don't bother with the FileFolderService

2016-12-05 13:01:50 GMT <Tichodroma> maybe these methods have no effect if you rename to to a value that is equal to the current cm:name property?

2016-12-05 13:02:03 GMT <Tichodroma> what do you recommend?

2016-12-05 13:03:34 GMT <AFaust> I recommend using NodeService.moveNode directly (it's what I usually do) to change the primary child assoc QName

2016-12-05 13:04:46 GMT <AFaust> And personally I do not considerMNT-11909 to be a bug at all - various features in Alfresco have the specific behaviour of creating nodes where the primary parent association has a QName different to what would be appropriate based on cm:name

2016-12-05 13:05:24 GMT <Tichodroma> but without this issue being fixed there can be multiple nodes with identical primaries

2016-12-05 13:05:28 GMT <AFaust> Some of the core bootstrapped folder structures for instances are using QNames different to cm:name when the system is bootstrapped in a language other than English

2016-12-05 13:06:28 GMT <AFaust> Sure - that is perfectly valid according to the domain model.

2016-12-05 13:06:48 GMT <AFaust> Although very annoying to anyone using path-based lookups

2016-12-05 13:07:10 GMT <Tichodroma> yes, these lookups don't work as expected

2016-12-05 13:07:49 GMT <AFaust> Oh well - the issue is already marked as fixed.

2016-12-05 13:09:04 GMT <AFaust> I was just afraid that they might fix it in one of the typical "fix it like suggested without considering side effects" ways, but as it is already a bit "older" and I have not seen those, such concern is unwarranted

2016-12-05 13:10:57 GMT <Xen_> thnx AFaust i will move it then

2016-12-05 13:34:16 GMT *** marsv024_ is now known as marsv024

2016-12-05 13:35:51 GMT <Xen_> AFaust: sorry for troubling you, i moved it to the correct place, but i get this message now : org.activiti.engine.ActivitiException: Exception while invoking TaskListener: Exception while invoking TaskListener: 11050008 Failed to execute supplied script: 11050007 ReferenceError: "i" is not defined. (AlfrescoJS#5)

2016-12-05 13:40:51 GMT <yreg> Xen_, that sounds like an issue with your script

2016-12-05 13:41:13 GMT <yreg> you are maybe trying to access some variable before you initiate it

2016-12-05 13:42:36 GMT <Xen_> this is my script, cant see anythig wrong....http://pastebin.com/WxcepZgh

2016-12-05 13:42:37 GMT <alfbot> Title: script - Pastebin.com (at pastebin.com)

2016-12-05 13:42:45 GMT <Xen_> maybe im just missing something

2016-12-05 13:45:58 GMT <Xen_> only thing i cant think of is this: trans.execute(bpm_package.children[0]);]]></activiti:string>

2016-12-05 13:46:07 GMT <Xen_> must be a [i]

2016-12-05 13:47:36 GMT <AFaust> The first line is already problematic: bpm_package.children[i].parent

2016-12-05 13:47:42 GMT <AFaust> "i" has not been defined before

2016-12-05 13:48:02 GMT <AFaust> Oh - it actually is the second line since the other one is in the <![CDATA[ line

2016-12-05 13:48:36 GMT <AFaust> The same thing a few lines further down

2016-12-05 13:48:59 GMT <Xen_> must it then be 0

2016-12-05 13:50:26 GMT <AFaust> probably - although I really dislike accessing children with a constant like 0 without checking if an element at position 0 actually exists

2016-12-05 13:51:52 GMT <Xen_> hmmm ok , just surprised it worked before....baffles me

2016-12-05 14:05:09 GMT <Xen_> i figured it out! http://pastebin.com/B3EMzyun

2016-12-05 14:05:10 GMT <alfbot> Title: working script - Pastebin.com (at pastebin.com)

2016-12-05 14:07:35 GMT <Xen_> yreg: if i only want the initiator to be able to approve this workflow can i add the permissions as per my pastebin? http://pastebin.com/JdGk06vx

2016-12-05 14:07:36 GMT <alfbot> Title: setPermissions - Pastebin.com (at pastebin.com)

2016-12-05 14:07:52 GMT <Xen_> i know it must be in the task listener but not sure where

2016-12-05 14:12:39 GMT <yreg> Xen_, What are you trying to do ?

2016-12-05 14:12:56 GMT <yreg> there is no permission called initiator AFAIK

2016-12-05 14:14:11 GMT <Xen_> when i send this workflow to a assignee he must only be allowed to comment/approve, not edit the document. Only the initiator can edit the document

2016-12-05 14:15:04 GMT <Xen_> or must it be Editor

2016-12-05 14:15:20 GMT <yreg> Ok, got it

2016-12-05 14:15:45 GMT <Xen_> am i completely off track?

2016-12-05 14:16:07 GMT <yreg> I would execute takeOwnership on the start event, break inheritance, and add read permissions to the assignee

2016-12-05 14:17:04 GMT <Xen_> do you maybe have an example

2016-12-05 14:17:15 GMT <Xen_> or previous posts discussing it

2016-12-05 14:17:28 GMT <yreg> nope, sorry!

2016-12-05 14:17:55 GMT <Xen_> so what i do there will never work

2016-12-05 14:20:01 GMT <yreg> To be honest, I do not think so

2016-12-05 14:21:17 GMT <Xen_> ok, thanks will try and figure out im a c++ / c# developer so learning html and java now

2016-12-05 14:21:39 GMT <Xen_> so not on grasp with all the terminology

2016-12-05 14:25:09 GMT <yreg> Xen_, these links may help you a bit : http://docs.alfresco.com/5.0/references/API-JS-takeOwnership.html

2016-12-05 14:25:10 GMT <alfbot> Title: takeOwnership | Alfresco Documentation (at docs.alfresco.com)

2016-12-05 14:25:25 GMT <yreg> http://docs.alfresco.com/5.0/references/API-JS-Security.html

2016-12-05 14:25:26 GMT <alfbot> Title: Security/Permissions API | Alfresco Documentation (at docs.alfresco.com)

2016-12-05 14:27:06 GMT <yreg> You could use java as well, and have more flexibility !

2016-12-05 14:30:47 GMT <bmejias> Hi all.... I'm trying to search items from data lists.

2016-12-05 14:31:01 GMT <bmejias> More in particular, I want find the word Calvin on the columns: dl:contactFirstName

2016-12-05 14:31:16 GMT <bmejias> what's the correct syntax to search for that?

2016-12-05 14:31:38 GMT <bmejias> I go to the site, and then search for contactFirstName:Calvin ?

2016-12-05 14:31:57 GMT <bmejias> or @dl\:contactFirstName\:Calvin ?

2016-12-05 14:32:10 GMT <yreg> bmejias, probably dl:contactFirstName:Calvin

2016-12-05 14:32:18 GMT <bmejias> that doesn't work either

2016-12-05 14:32:21 GMT <bmejias> thenks yreg

2016-12-05 14:32:27 GMT <bmejias> s/thenks/thanks/

2016-12-05 14:32:42 GMT <yreg> Did you try it in the node browser ?

2016-12-05 14:33:05 GMT <bmejias> damn it!

2016-12-05 14:33:12 GMT <bmejias> I mean, eureka!

2016-12-05 14:33:21 GMT <bmejias> now it worked!

2016-12-05 14:33:24 GMT <bmejias> I don't understnad.

2016-12-05 14:33:32 GMT <bmejias> anyway, dl:contactFirstName:Calvin seems to be fine.

2016-12-05 14:34:22 GMT <bmejias> thanks again yreg

2016-12-05 14:35:45 GMT <AFaust> bmejias: You can only use the simplified query form firstName:Axel for properties in the default content model namespace, e.g. where the prefix would be cm:

2016-12-05 14:36:04 GMT <AFaust> so, cm:firstName:Axel is equivalent to firstName:Axel

2016-12-05 14:37:34 GMT <AFaust> This is due to global hard-coded default namespace in QName.resolveToQName()

2016-12-05 14:38:02 GMT <AFaust> (and some other local hard-coded defaults along the same line)

2016-12-05 14:43:44 GMT <yreg> bmejias, I think the share search is not meant for execution such advance queries

2016-12-05 14:49:12 GMT <AFaust> yreg: Well - it is, but unfortunately the result rendering is not up to par with all potential types of results

2016-12-05 14:51:01 GMT <AFaust> It's just another case of a PM not defining all the different use cases as "relevant" before the feature ships. And missing use cases are not really prioritised in subsequent releases...

2016-12-05 14:54:21 GMT <bmejias> got it AFaust, thanks for the explanation

2016-12-05 15:17:59 GMT <qwebirc4405> AFaust: Still a question related to the permission issue from this morning. If I use the JS API with mySite.sitePermissionGroups then my new introduced permission appears in the list of available groups. But if I try to access the "Site Members" area, it still says that there is no Authority for GROUP_site_mysite_WebPublisher?? Any thoughts?

2016-12-05 15:20:35 GMT <AFaust> The stack trace of that error would be interesting to have before I make any "educated guesses"

2016-12-05 15:24:52 GMT <qwebirc4405> Caused by: org.alfresco.repo.security.authority.UnknownAuthorityException: 11050050 An authority was not found for GROUP_site_mysite_WebPublisher at org.alfresco.repo.security.authority.AuthorityDAOImpl.getContainedAuthorities(AuthorityDAOImpl.java:772) at org.alfresco.repo.security.authority.AuthorityServiceImpl.getContainedAuthorities(AuthorityServiceImpl.java:556) at org.alfresco.repo.site.SiteServiceImpl.listMembersInfoImp

2016-12-05 15:27:00 GMT <AFaust> qwebirc4405: The problem is likely related to how you created the group. The group must be a member of a site-specific container group.

2016-12-05 15:27:21 GMT <AFaust> Oh - wait a second.

2016-12-05 15:27:57 GMT <AFaust> Which Alfresco version are you using?

2016-12-05 15:28:39 GMT <qwebirc4405> AFaust: Enterprise v5.1.1 (.4 r130429-b148) schema 9,031

2016-12-05 15:30:00 GMT <AFaust> Ok - than the code I am looking at should match yours

2016-12-05 15:30:27 GMT <AFaust> But my first guess is likely not correct...

2016-12-05 15:30:34 GMT <qwebirc4405> AFaust: I was looking at the following tutorial: http://docs.alfresco.com/5.1/references/dev-extension-points-permissions.html

2016-12-05 15:30:36 GMT <alfbot> Title: Permissions / Roles | Alfresco Documentation (at docs.alfresco.com)

2016-12-05 15:31:17 GMT <qwebirc4405> Yeah, it might be because they didn't mention a site-specific container.

2016-12-05 15:32:51 GMT <AFaust> Looking at the code it actually is unlikely that this is the cause. Comparing the site.sitePermissionGroups code with listMembersInfoImpl and they look very much alike, so they should both work identically

2016-12-05 15:34:11 GMT <qwebirc4405> AFaust: Even if I'm looking from the repository point (Repository->Sites->MySite --> Manage Permissions instead of Site->MySite -> Site Members) there is no GROUP authority, so the error seems to be correct

2016-12-05 15:35:02 GMT <qwebirc4405> then my guess was that maybe the site.sitePermissionGroups API is wrong but it seems not!?

2016-12-05 15:35:11 GMT <AFaust> That way of viewing will actually not show you anything about the group existence...

2016-12-05 15:35:28 GMT <AFaust> I mean nothing that is reliable enough

2016-12-05 15:36:04 GMT <AFaust> Can you please use the node browser to check your /sys:system/sys:authorities/* path for your group?

2016-12-05 15:39:21 GMT <qwebirc4405> AFaust: I've checked it. The group authority does not exist for "mysite" but it does exist for the new created site.

2016-12-05 15:39:55 GMT <AFaust> I thought you created it in the meantime for the old site as well?

2016-12-05 15:46:05 GMT <qwebirc4405> AFaust: I've to cover at least 300+ existing sites. So my intention was to create a check Javascript that will list me all sites that does not has the new permission group yet. Then it is planned do add/create the missing structure for each affected site. But the pain is that site.sitePermissionGroups says that the group is already present at all the existing sites.... but it is not.

2016-12-05 15:46:58 GMT <qwebirc4405> That's why I'm struggling now...

2016-12-05 15:48:37 GMT <AFaust> site.sitePermissionGroups does not really check if the group exists. It just uses the permission to build the name of the group as it "expects it to exist" but does not verify this.

2016-12-05 15:53:54 GMT <qwebirc4405> AFaust: So what could be way to achieve this? I see that there is a Authority service where I can create groups but there seems to be no check function but there is a searchGroups()? maybe this will help?

2016-12-05 15:58:16 GMT <AFaust> searchGroups will not help. You need to create the missing group!

2016-12-05 15:58:36 GMT <AFaust> For all of the sites that are affected by the new permission model

2016-12-05 16:01:40 GMT <qwebirc4405> AFaust: Yes, I understand but before creating it, I was looking for an easy function to get rid of all the sites that does not have the permission yet. I was expecting a list that I can iterate and within that loop I would like to create the missing group authorities.

2016-12-05 16:02:57 GMT <AFaust> the script authority service should allow you to check via getGroup(groupName) - it returns null if the group does not exist

2016-12-05 16:06:01 GMT <qwebirc4405> AFaust: Ok, so you mean I have to loop over all existing sites to get the names and based on the names I can create the name of the group (because it contains the sitename) and check it against getGroup()?

2016-12-05 16:06:50 GMT <AFaust> yep

2016-12-05 16:07:40 GMT <AFaust> alternatively you could use facet on the SITE meta-field in SOLR without having to access the sites on the DB

2016-12-05 16:07:48 GMT <qwebirc4405> Thanks, I'll give it another try.

2016-12-05 20:24:03 GMT *** cyberz_ is now known as cyberz

End of Daily Log

The other logs are at http://esplins.org/hash_alfresco