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

2019-06-07 06:07:04 GMT <alfresco-discord> <MorganP> language issue?

2019-06-07 06:07:43 GMT <alfresco-discord> <MorganP> (locale)

2019-06-07 07:29:25 GMT <alfresco-discord> <dgradecak> I do not think so

2019-06-07 07:29:40 GMT <alfresco-discord> <dgradecak> well who knows ... not sure actually

2019-06-07 07:30:13 GMT <alfresco-discord> <dgradecak> but when clicking on the creator facet "Administrator" I would expect it to work without language issue

2019-06-07 07:31:21 GMT <alfresco-discord> <dgradecak> and a multivalue field in facets works only with tokenization false, but I guess that is something else

2019-06-07 07:56:52 GMT <alfresco-discord> <dgradecak> AFaust: are you around?

2019-06-07 07:57:46 GMT <AFaust> Yes...

2019-06-07 07:57:54 GMT <alfresco-discord> <dgradecak> does anyone know how to add a multivalue property through a multipart request? Seems multivalues work only with json

2019-06-07 07:58:59 GMT <alfresco-discord> <dgradecak> I wonder if you know something about the multipart and multivalues ... seems will need to gid in the code again like for aspects and multipart, probably something that was not well thought?

2019-06-07 07:59:40 GMT <AFaust> Multivalue properties need to be provided with multiple fields of the same name in the multipart request

2019-06-07 07:59:53 GMT <alfresco-discord> <dgradecak> but the last one overrides the others

2019-06-07 08:00:08 GMT <alfresco-discord> <dgradecak> usually that is how it should work indeed

2019-06-07 08:01:39 GMT <AFaust> It should not override but automatically merge into an array of values, see https://github.com/Alfresco/surf-webscripts/blob/master/spring-webscripts/spring-webscripts/src/main/java/org/springframework/extensions/webscripts/servlet/FormData.java#L178

2019-06-07 08:01:40 GMT <alfbot> Title:surf-webscripts/FormData.java at master Β· Alfresco/surf-webscripts Β· GitHub (at github.com)

2019-06-07 08:02:10 GMT <alfresco-discord> <dgradecak> I am talking about the new REST API

2019-06-07 08:02:20 GMT <alfresco-discord> <dgradecak> not sure if it reuses the same mechanism

2019-06-07 08:02:44 GMT <AFaust> And NodesImpl uses these mapped parameters here: https://github.com/Alfresco/alfresco-remote-api/blob/master/src/main/java/org/alfresco/rest/api/impl/NodesImpl.java#L2929

2019-06-07 08:02:45 GMT <alfbot> Title:alfresco-remote-api/NodesImpl.java at master Β· Alfresco/alfresco-remote-api Β· GitHub (at github.com)

2019-06-07 08:02:50 GMT <alfresco-discord> <dgradecak> for webscripts indeed, I know it works

2019-06-07 08:03:24 GMT <AFaust> If you trace the origin of the formDataParameters variable, it comes from the FormData class

2019-06-07 08:03:30 GMT <alfresco-discord> <dgradecak> will do some debugging than as it does not behave like that

2019-06-07 08:03:35 GMT <alfresco-discord> <Thijs> Is there a way to remove a document model from the model manager, and deploy it on the classpath instead? In a production environment where the model is actually used.

2019-06-07 08:03:37 GMT <alfresco-discord> <dgradecak> ok will check

2019-06-07 08:03:51 GMT <AFaust> Thijs: hahaha.... of course not (in a clean way)

2019-06-07 08:04:08 GMT <alfresco-discord> <Thijs> I hate that model manager

2019-06-07 08:04:15 GMT <AFaust> You and me both...

2019-06-07 08:04:17 GMT <alfresco-discord> <Thijs> clients think they can just use it

2019-06-07 08:05:01 GMT <AFaust> Luckily, the model manager works with a dynamic model deployed via Data Dictionary/Models

2019-06-07 08:05:19 GMT <AFaust> So the best way to deal with this is use DB to set cm:modelActive to false during server downtime.

2019-06-07 08:05:46 GMT <alfresco-discord> <Thijs> I found it in Models

2019-06-07 08:05:48 GMT <AFaust> Or better yet, delete the node for the XML...

2019-06-07 08:05:57 GMT <AFaust> And then restart with model from classpath

2019-06-07 08:06:07 GMT <alfresco-discord> <Thijs> and I edited the file on disk

2019-06-07 08:06:12 GMT <alfresco-discord> <Thijs> with a dummy model

2019-06-07 08:06:29 GMT <alfresco-discord> <Thijs> but that gives me some errors, because I guess there are some references to it

2019-06-07 08:06:31 GMT <AFaust> You may also then have to manually delete the Surf extension and what not that comes with the dynamic model.

2019-06-07 08:07:00 GMT <alfresco-discord> <Thijs> oh hell

2019-06-07 08:07:04 GMT <AFaust> Yes - as soon as one node uses an aspect or type of that model, you cannot simply modify it to a dummy

2019-06-07 08:07:32 GMT <alfresco-discord> <Thijs> but I deployed the model using bootstrap at the same time

2019-06-07 08:08:19 GMT <alfresco-discord> <dgradecak> well in the remote api 7.35 the code is not handling those multivalues and that version is coming with community 6.1.2

2019-06-07 08:08:46 GMT <alfresco-discord> <dgradecak> but I agree on master it seems correct

2019-06-07 08:09:31 GMT <AFaust> An alternative approach: Deploy the classpath model using a different namespace, make sure at least one type / aspect of the model is used, shutdown the server, and then update alf_qname table, mapping all qnames from the old namespace to the new namespace by changing ns_id value.

2019-06-07 08:09:56 GMT <AFaust> After restart, the dynamic model should have no references / uses by any node, and you should be able to cleanly undeploy it via model manager itself.

2019-06-07 08:10:01 GMT <alfresco-discord> <Thijs> thanks for the pointers

2019-06-07 08:10:05 GMT <AFaust> Drawback: Full reindex required

2019-06-07 08:12:18 GMT <AFaust> dgradecak: I see the difference. In my IDE I have both master checked out and source attachments for the release JARs, and I naturally check master first...

2019-06-07 08:12:53 GMT <alfresco-discord> <dgradecak> logically, not an issue. But seems even enterprise is affected by that of course

2019-06-07 08:13:05 GMT <AFaust> Well, I mean, public v1 ReST API is effectively still in an "early access" state, with various operations / usage patterns not fit for stable production.

2019-06-07 08:13:21 GMT <alfresco-discord> <Thijs> I guess I'll stick with the dynamic model for now then

2019-06-07 08:14:22 GMT <AFaust> If they were serious with having a versioned API and v1 being ready when they first released it, they should now have dedicated URLs for a version 1.3.1 ReST API...

2019-06-07 08:14:32 GMT <alfresco-discord> <Thijs> don't want to postpone a production date for that

2019-06-07 08:14:36 GMT <AFaust> or whatever incremental state we are on now

2019-06-07 08:15:19 GMT <alfresco-discord> <dgradecak> btw, do you have any idea why on community the faceting on cm:creator and cm:modifier would not work? can you check that with your germen locale or so ... if it works on community 6.x ?

2019-06-07 08:16:02 GMT <alfresco-discord> <dgradecak> I checked on 6.0x and 6.1x community (withc english/croatian/french) but nothings helps

2019-06-07 08:16:53 GMT <angelborroy> @dgradecak did you checked how to configure SOLR 6 for cross locale environments?

2019-06-07 08:16:54 GMT <angelborroy> https://github.com/aborroy/search-services-cross-locale

2019-06-07 08:16:55 GMT <alfbot> Title:GitHub - aborroy/search-services-cross-locale: Alfresco Search Services deployment for Cross Locale users (at github.com)

2019-06-07 08:16:55 GMT <alfresco-discord> <dgradecak> however enterprise works correctly, so I wonder what is going on

2019-06-07 08:17:16 GMT <alfresco-discord> <dgradecak> but why would all other faceting work correctly?

2019-06-07 08:17:39 GMT <alfresco-discord> <dgradecak> I am not using a single solr instance with different locales actually

2019-06-07 08:19:02 GMT <alfresco-discord> <dgradecak> I read when Angel publish it, although did not try that as I did not have suche a use case yet

2019-06-07 08:19:20 GMT <angelborroy> So all your content is in the same language in your Repo?

2019-06-07 08:19:26 GMT <alfresco-discord> <dgradecak> yes

2019-06-07 08:20:06 GMT <angelborroy> And your users have the same language configured on their web browsers?

2019-06-07 08:20:10 GMT <alfresco-discord> <dgradecak> and faceting on thow (creator/modifier) does not work, will go check if faceting through solr directly works as it is strange

2019-06-07 08:20:17 GMT <alfresco-discord> <dgradecak> yes

2019-06-07 08:20:48 GMT <alfresco-discord> <dgradecak> I just checked all that locally (all english)

2019-06-07 08:21:14 GMT <angelborroy> That faceting fields should work then

2019-06-07 08:21:29 GMT <alfresco-discord> <dgradecak> I agree it should

2019-06-07 08:21:40 GMT <alfresco-discord> <dgradecak> those are not even ML right?

2019-06-07 08:21:52 GMT <angelborroy> No

2019-06-07 08:21:54 GMT <alfresco-discord> <dgradecak> or did I dring too much this morning

2019-06-07 08:29:00 GMT <AFaust> You must have "dring" to much.

2019-06-07 08:29:08 GMT * AFaust does not know what "dring" is slang for...

2019-06-07 08:29:21 GMT <AFaust> ;)

2019-06-07 08:41:05 GMT <alfresco-discord> <dgradecak> trinken πŸ˜„ drunken ... or so πŸ˜„

2019-06-07 08:41:25 GMT <alfresco-discord> <dgradecak> aha you do not see edits on irc πŸ˜‰

2019-06-07 08:53:04 GMT <alfresco-discord> <dgradecak> any opinon about replacing "manually" in 6.1.2-ga community the alfresco remote api jar to version 7.9 ?

2019-06-07 08:53:14 GMT <alfresco-discord> <dgradecak> should work .. could work ... absolutely not πŸ˜„

2019-06-07 08:55:18 GMT <alfresco-discord> <dgradecak> seems should be a version of the jar like "repo-4388-7.52-4"

2019-06-07 08:56:17 GMT <Tichodroma> Why do you want to replace this JAR?

2019-06-07 08:56:26 GMT <alfresco-discord> <dgradecak> rest api issues

2019-06-07 08:56:32 GMT <Tichodroma> It should be easy to to, alfresco.war is just a zip file.

2019-06-07 08:57:07 GMT <alfresco-discord> <dgradecak> not a problem replacing it, just wondering if something is known that will break things

2019-06-07 08:57:14 GMT <Tichodroma> And once expanded by tomcat, you can just replace it in the filesystem.

2019-06-07 08:57:22 GMT <Tichodroma> ah, I see

2019-06-07 08:58:40 GMT <Tichodroma> isn't alfresco-remote-api:7.35 part of 6.1-ga?

2019-06-07 08:58:45 GMT <alfresco-discord> <dgradecak> it is

2019-06-07 08:58:55 GMT <Tichodroma> so what about 7.9 and 7.52?

2019-06-07 08:59:12 GMT <Tichodroma> which do you want to use instead of 7.35?

2019-06-07 09:00:36 GMT <alfresco-discord> <dgradecak> there is an issue with multivalue fields and multipart request, they are not taken into consideration (we discussed about that earlier, just scroll up). And there is a fix on master from 2 months ago, which afects that remote api jar

2019-06-07 09:01:06 GMT <Tichodroma> I'd just give it a try.

2019-06-07 09:01:44 GMT <alfresco-discord> <dgradecak> and test all the things or just the mutlivalue part πŸ˜‰

2019-06-07 09:02:16 GMT <Tichodroma> or look at the diffs between 7.35 and the version you want to use

2019-06-07 09:40:39 GMT <alfresco-discord> <dgradecak> Afauts: just confirming that the fix works correctly with multivalues and multipart

2019-06-07 09:41:59 GMT <alfresco-discord> <dgradecak> Angel: do you know when will be the next community release? I could not find anything about that

2019-06-07 10:21:45 GMT <Tichodroma> Die anybody encouter that a call to `serviceRegistry.getPersonService().getPerson("System")` throws "05070036 Person 'System' already exists."?

2019-06-07 10:22:00 GMT <Tichodroma> s/Die/Did/

2019-06-07 10:22:25 GMT <angelborroy> @dgradecak Alfresco Community 6.2 will be released (hopefully) in Sept/October

2019-06-07 10:22:46 GMT <angelborroy> There will be no β€œEA” release previously, it will be a β€œGA”

2019-06-07 10:22:53 GMT <angelborroy> (just don’t ask me why, please)

2019-06-07 10:23:35 GMT <Tichodroma> The above call results in `org.alfresco.repo.security.person.PersonServiceImpl.createMissingPersonAsSystem(PersonServiceImpl.java:889)` being executed (Alfresco 6.1)

2019-06-07 10:25:57 GMT <alfresco-discord> <dgradecak> ok Angel;) thank you

2019-06-07 10:28:12 GMT <alfresco-discord> <dgradecak> not sure System is a person, why are you getting like that actually?

2019-06-07 10:28:50 GMT <alfresco-discord> <dgradecak> .getPerson("...", false) maybe? but what is your use case to do something like that?

2019-06-07 10:29:50 GMT <alfresco-discord> <dgradecak> that second parameter should avoid creating a person, because system is a bit specific

2019-06-07 10:30:12 GMT <Tichodroma> I only call `serviceRegistry.getPersonService().getPerson("System")` inside a `AuthenticationUtil.RunAsWork`. System should exist.

2019-06-07 10:30:33 GMT <alfresco-discord> <dgradecak> but why would you call it like that?

2019-06-07 10:31:04 GMT <alfresco-discord> <dgradecak> the static string youhave here AuthenticationUtil.SYSTEM_USER_NAME

2019-06-07 10:31:36 GMT <Tichodroma> Because I need it as a `NodeRef personRef` to be able to call `NodeRef homeSpaceRef = (NodeRef) serviceRegistry.getNodeService().getProperty(personRef, ContentModel.PROP_HOMEFOLDER);`

2019-06-07 10:31:38 GMT <alfresco-discord> <dgradecak> what is your point to get System via the person service?

2019-06-07 10:31:44 GMT <Tichodroma> ^^

2019-06-07 10:32:33 GMT <alfresco-discord> <dgradecak> not getting this sorry, I think you are making a mistake with this

2019-06-07 10:32:41 GMT <Tichodroma> maybe something with the installation is broken (Alfresco 6.1). This code work without any problems for years.

2019-06-07 10:32:49 GMT <Tichodroma> Why do you think so?

2019-06-07 10:32:56 GMT <alfresco-discord> <dgradecak> usually you would call a runAs with the system user

2019-06-07 10:33:03 GMT <Tichodroma> This code is years old and worked at least from 4.2+

2019-06-07 10:33:18 GMT <alfresco-discord> <dgradecak> ach so ...

2019-06-07 10:33:39 GMT <alfresco-discord> <dgradecak> so you want to get the homefolder of system ?

2019-06-07 10:33:58 GMT <Tichodroma> that's what I do: call ` AuthenticationUtil.runAs(runAsWork, AuthenticationUtil.getSystemUserName());`. But I *also* need the homefolder.

2019-06-07 10:34:09 GMT <Tichodroma> ^^ yes

2019-06-07 10:34:56 GMT <alfresco-discord> <dgradecak> just think, what should be the home folder of a system user or admin?

2019-06-07 10:35:00 GMT <Tichodroma> Maybe the question is: Why does this Alfresco installation think that System does not exist while it does exist?

2019-06-07 10:35:02 GMT <alfresco-discord> <dgradecak> usually it is company_home

2019-06-07 10:35:16 GMT <alfresco-discord> <dgradecak> I do not think System is trheated as a "user"

2019-06-07 10:35:45 GMT <alfresco-discord> <dgradecak> still in some part it is, but not a user per sei

2019-06-07 10:36:38 GMT <Tichodroma> Probably. As written above, in the stacktrace of the error there is a call to `org.alfresco.repo.security.person.PersonServiceImpl.createMissingPersonAsSystem(PersonServiceImpl.java:889)` which hints that Alfresco knows about the special natur of System.

2019-06-07 10:36:52 GMT <alfresco-discord> <dgradecak> usually the code like that would not require to get the home of the system user, but of the really authenticated user

2019-06-07 10:37:03 GMT <Tichodroma> I don

2019-06-07 10:37:10 GMT <Tichodroma> I don't think that's the problem.

2019-06-07 10:37:56 GMT <alfresco-discord> <dgradecak> just repeating: ....getPerson("...", false) maybe?

2019-06-07 10:38:08 GMT <Tichodroma> Please don't let's argue about the usecase. This "homefolder" is required and our custom utility method that does this worked so far. Either the Alfresco 6.1 installation is broken or ...?

2019-06-07 10:38:13 GMT <Tichodroma> Maybe.

2019-06-07 10:38:28 GMT <alfresco-discord> <dgradecak> I am not arguing

2019-06-07 10:39:00 GMT <Tichodroma> ok

2019-06-07 10:39:43 GMT <Tichodroma> I will try the `.getPerson("System", false)` approach

2019-06-07 10:40:07 GMT <Tichodroma> ty so far

2019-06-07 10:40:49 GMT <alfresco-discord> <dgradecak> although I am not sure you will get a noderef but could be

2019-06-07 10:41:17 GMT <alfresco-discord> <dgradecak> if you cna change the code (seems you can) I would change that logic honestly but still not arguing πŸ˜‰

2019-06-07 10:41:27 GMT <Tichodroma> maybe later

2019-06-07 10:45:28 GMT <Tichodroma> using the overloaded version of `.getPerson` I get this error: "05070003 User does not exist and could not be created: System"

2019-06-07 10:45:45 GMT <Tichodroma> Seems I have to check what is broken with this installation

2019-06-07 10:58:23 GMT <Tichodroma> OK, found the cause: /sys:system/sys:people does not have a child cm:system which the above methods are looking for.

2019-06-07 10:58:34 GMT <Tichodroma> I have no idea where this node has gone.

2019-06-07 11:44:11 GMT <AFaust> Tichodroma: There should never be a call to getPerson() with user name "System" - actually, there should never be a call to getPerson() in any code unless you are willing to cause implicit user creation. getPersonOrNull() is the proper API to use

2019-06-07 11:45:26 GMT <AFaust> Oh - when scrolling through the history I missed the part of "don't let's argue about the use case"

2019-06-07 11:46:07 GMT <AFaust> Anyway, I have seen similar errors in installations of Alfresco 4 and 5, different minor versions too. And seen community.alfresco.com / forums.alfresco.com posts about it.

2019-06-07 11:46:50 GMT <AFaust> System user NEVER exists and should NEVER exist. It is a pseudo user without a cm:person object

2019-06-07 11:49:46 GMT <AFaust> In a lot of systems where people have configured create.missing.people to true, code like the getPerson() has caused the implicit creation of System as cm:person, even though this is utter BS. Unfortunately, the default value of that property is true, so you must have disabled missing person creation to get the error.

2019-06-07 11:54:00 GMT <AFaust> TL;DR: Your installation is actually not broken, but as it should be. The only difference to other systems is that create.missing.people is false, which is not the default configuration Alfresco ships (though it should be)

2019-06-07 12:14:59 GMT <alfresco-discord> <drazen04> Hi guys. Someone knows how to raise a throw exception message from javascript in the bpm xml??

2019-06-07 12:17:51 GMT <Tichodroma> AFaust: thanks, I will check this property

2019-06-07 13:01:36 GMT <Tichodroma> AFaust: Thanks for pointer to `getPersonOrNull(String name)`. That solved my issue. It seems that the behaviour behind this and related messages changed since 5.2.

2019-06-07 13:56:22 GMT <AFaust> As far as I am aware, there have been no changes with regards to create.missing.people since 3.4 or so. PersonService API has been enhanced somewhere in 4.x with the getPerson(String, boolean) signature being added from a 3.4 EE maintenance branch

2019-06-07 13:57:02 GMT <AFaust> getPersonOrNull was added in 4.2 it seems from a 4.1 EE maintenance branch

2019-06-07 13:57:41 GMT <AFaust> Before that you had to check personExists(String) first to avoid the implicit creation if you did not want it

2019-06-07 14:11:16 GMT <Tichodroma> OK.

2019-06-07 14:18:31 GMT <alfresco-discord> <Thijs> I'm in jmxterm connected to an Alfresco 5.1

2019-06-07 14:18:41 GMT <alfresco-discord> <Thijs> and I want to reset the config to Solr

2019-06-07 14:18:50 GMT <alfresco-discord> <Thijs> What bean do I need?

2019-06-07 14:21:17 GMT <alfresco-discord> <Thijs> found it

2019-06-07 14:21:34 GMT <alfresco-discord> <Thijs> bean Alfresco:Category=Search,Type=Configuration,id1=managed,id2=solr4

2019-06-07 14:21:46 GMT <alfresco-discord> <Thijs> run revert

2019-06-07 14:23:03 GMT <alfresco-discord> <MorganP> revert does only revert to the last saved version, it might not be the initial one

2019-06-07 14:24:22 GMT <alfresco-discord> <Thijs> initial?

2019-06-07 14:24:37 GMT <alfresco-discord> <Thijs> it is reverted to what I have in my global properties

2019-06-07 14:33:21 GMT <AFaust> Yeah - JMX configuration is not versioned, so it will just remove any custom JMX config properties and go back to the file-based subsystem config

2019-06-07 14:34:50 GMT <alfresco-discord> <Thijs> that's what I need, and it is working

End of Daily Log

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