Alfresco discussion and collaboration. Stick around a few hours after asking a question.
Official support for Enterprise subscribers: support.alfresco.com.
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.
More help is available in this list of resources.
2017-10-19 07:11:16 GMT <Joyson> Hi Guys, I am tryting to set aspect content property to a node via a webscript and I was successfull.
2017-10-19 07:11:26 GMT <Joyson> code <> ContentWriter writer = contentService.getWriter(parentNodeRef, Model.aspectContentProperty, true); writer.guessMimetype(fileField.getMimetype()); writer.setEncoding("UTF-8"); writer.putContent(fileField.getInputStream()); code <>
2017-10-19 07:11:33 GMT <yreg> Morning everyone !
2017-10-19 07:11:34 GMT <DarkStar1> Morning everyone.
2017-10-19 07:11:39 GMT <Joyson> Now I am updating the content property the same way code <> ContentWriter writer = contentService.getWriter(parentNodeRef, Model.aspectContentProperty, true); writer.setMimetype(fileField.getMimetype()); writer.setEncoding("UTF-8"); writer.putContent(fileField.getInputStream()); code <>
2017-10-19 07:11:51 GMT <Joyson> and everything looks fine in node-browser (content proeprty of aspect is updated) Now my concern is that if check the path of older content property inside alf_data/contentstore/timepath/uuid.bin the file still exists !! and new one is created for updated property and only the content path of new is updated in aspect content property of node.
2017-10-19 07:12:01 GMT <Joyson> My question, Is this is best way to update content property of an aspect ? or what happens to older bin file of aspect content file ?
2017-10-19 07:12:17 GMT <Joyson> when will it get deleted or moved to contentstore.deleted and deleted permananty from contentstore.deleted ?
2017-10-19 07:12:26 GMT <Joyson> Do I have to do this manually ?
2017-10-19 07:13:06 GMT <DarkStar1> Joyson: Easier to visualise your code if you use something like: https://hastebin.com/
2017-10-19 07:13:07 GMT <alfbot> Title: hastebin (at hastebin.com)
2017-10-19 07:14:09 GMT <Joyson> sorry about that..
2017-10-19 07:14:10 GMT <Joyson> https://hastebin.com/ewupivuned.scala
2017-10-19 07:14:11 GMT <alfbot> Title: hastebin (at hastebin.com)
2017-10-19 07:14:21 GMT <yreg> Joyson, wait for two weeks (in an active alfresco system) and the content will probably get moved from contentstore to contentstore.deleted
2017-10-19 07:14:52 GMT <yreg> (unless it is still referenced by an other node, ie: a version node for instance)
2017-10-19 07:15:35 GMT <Joyson> I read the same from here https://community.alfresco.com/docs/DOC-5156-content-store-configuration
2017-10-19 07:15:37 GMT <alfbot> Title: Content Store Configuration | Alfresco Community (at community.alfresco.com)
2017-10-19 07:16:19 GMT <yreg> Joyson, even though this was actually crafted for the out of the box cm:content properety, it is actually true for custom content as well AFAIK
2017-10-19 07:16:20 GMT <yreg> https://github.com/keensoft/alfresco-deleted-content-store-cleaner
2017-10-19 07:16:21 GMT <alfbot> Title: GitHub - keensoft/alfresco-deleted-content-store-cleaner: Alfresco Deleted Content Store Cleaner job (at github.com)
2017-10-19 07:17:05 GMT <yreg> the 14 days period is actually configurable
2017-10-19 07:18:59 GMT <Joyson> how do I update content proeprty of an aspect ? everytime I update alfresco creates a new .bin file I can see the updated content store url in node-browser
2017-10-19 07:19:55 GMT <Joyson> and both older and newer .bin exists in contentstore
2017-10-19 07:40:29 GMT *** ChanServ sets mode: +o fcorti
2017-10-19 07:41:05 GMT *** fcorti changes topic to "Alfresco discussion and collaboration. Stick around a few hours after asking a question. Logs: http://chat.alfresco.com Channel help: https://community.alfresco.com/ Official support for Enterprise subscribers: http://support.alfresco.com. Why don't you submit to DevCon 2018? Check here: https://youtu.be/Qfq_0YSdI3o."
2017-10-19 08:49:32 GMT <AFaust> ~later tell Joyson: There are no APIs to just "update" a specific *.bin inside the content store if that is what you mean with "update content property". That would be an unsafe operation since the same content file could be referenced by other nodes (as yreg mentioned). The behaviour you are seeing is correct - new/updated content = new *.bin file
2017-10-19 08:49:32 GMT <alfbot> AFaust: The operation succeeded.
2017-10-19 09:03:19 GMT <yreg> AFaust, I will have to disagree with you on this one
2017-10-19 09:04:29 GMT <yreg> AFaust, only admin is authorized through the security interceptor for this method : https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/source/java/org/alfresco/service/cmr/repository/ContentService.java#L96
2017-10-19 09:04:30 GMT <alfbot> Title: community-edition-old/ContentService.java at master · Alfresco/community-edition-old · GitHub (at github.com)
2017-10-19 09:05:41 GMT <yreg> AFaust, ignore that, I read "access" instead of "update"
2017-10-19 09:05:53 GMT <AFaust> hehe
2017-10-19 09:06:42 GMT <AFaust> So no reason to completely throw away my career for missing something so obvious then...
2017-10-19 09:11:14 GMT <yreg> well AFaust there actually might be a way to do that
2017-10-19 09:11:32 GMT <yreg> refer to https://github.com/Alfresco/community-edition-old/blob/master/projects/data-model/source/java/org/alfresco/repo/content/ContentStore.java#L215
2017-10-19 09:11:33 GMT <alfbot> Title: community-edition-old/ContentStore.java at master · Alfresco/community-edition-old · GitHub (at github.com)
2017-10-19 09:12:36 GMT <yreg> but I have never tried that
2017-10-19 09:13:27 GMT <yreg> you should know better you are the one who fiddled modt with ContentStores
2017-10-19 09:15:01 GMT <alfbot> Joyson: Sent 25 minutes ago: <AFaust> There are no APIs to just update a specific *.bin inside the content store if that is what you mean with update content property . That would be an unsafe operation since the same content file could be referenced by other nodes (as yreg mentioned). The behaviour you are seeing is correct - new/updated content = new *.bin file
2017-10-19 09:15:31 GMT <Joyson> Thanks AFaust
2017-10-19 09:16:38 GMT <Joyson> one more question, what happens to the older .bin file in this case, is it a orphan ?
2017-10-19 09:17:12 GMT <angelborroy> joyson probably this graph can help https://github.com/keensoft/alfresco-deleted-content-store-cleaner
2017-10-19 09:17:13 GMT <alfbot> Title: GitHub - keensoft/alfresco-deleted-content-store-cleaner: Alfresco Deleted Content Store Cleaner job (at github.com)
2017-10-19 09:18:58 GMT <Joyson> Thanks angel yreg suggested me same link few hours ago. I will go through it :)
2017-10-19 09:20:17 GMT <yreg> ~since Joyson
2017-10-19 09:20:17 GMT <alfbot> yreg: <AFaust> ~later tell Joyson: There are no APIs to just "update" a specific *.bin inside the content store if that is what you mean with "update content property". That would be an unsafe operation since the same content file could be referenced by other nodes (as yreg mentioned). The behaviour you are seeing is correct - new/updated content = new *.bin file, <yreg> AFaust, I will have to disagree with you on this (2 more messages)
2017-10-19 09:52:24 GMT <yreg> I am getting Alfresco day promotion emails on the address I used to sign up for devcon newsletter :)
2017-10-19 09:57:11 GMT <fcorti> yreg really?
2017-10-19 10:12:10 GMT <yreg> fcorti, yes
2017-10-19 10:12:56 GMT <fcorti> will write to marketing...
2017-10-19 10:13:16 GMT <yreg> I am not complaining, just a remark
2017-10-19 10:14:42 GMT <fcorti> I can imagine, but don't want to spam people
2017-10-19 10:31:09 GMT <AFaust> As always, marketing people will take any contact database they can find...
2017-10-19 11:03:10 GMT <douglascrp> morning guys
2017-10-19 11:26:30 GMT <yreg> AFaust, actually they did not send any thing on my email from support portal nor on the email I use to download installers
2017-10-19 11:26:48 GMT <yreg> someone probably took the wrong list
2017-10-19 12:07:46 GMT <fcorti> yreg, kristen is checking. They should be different lists... not a big deal but let's solve this.
2017-10-19 12:38:10 GMT <yreg> douglascrp, ping
2017-10-19 13:13:57 GMT <douglascrp> yreg, pong
2017-10-19 13:21:22 GMT <douglascrp> where is the current version of alfresco's source code hosted?
2017-10-19 13:21:40 GMT <douglascrp> I see the github project now has tags up to 5.1, nothing to 5.2
2017-10-19 13:21:52 GMT <AFaust> douglascrp: You need to be more specific nowadays...
2017-10-19 13:21:57 GMT <AFaust> Which part of the Alfresco source code?
2017-10-19 13:22:03 GMT <douglascrp> repository
2017-10-19 13:22:30 GMT <AFaust> I believe repository is still in transition and not yet on GitHub
2017-10-19 13:22:36 GMT <douglascrp> I think I saw a post on the topic, but I could not find it now
2017-10-19 13:22:42 GMT <AFaust> but also no longer in SVN, if I am correct
2017-10-19 13:22:48 GMT <douglascrp> ah, that is what I thought
2017-10-19 13:22:57 GMT <angelborroy> it was a post from Richard at Jive platform
2017-10-19 13:23:03 GMT <douglascrp> so, while they do the transition, we can not see it
2017-10-19 13:23:10 GMT <douglascrp> angelborroy, ah, let me try to find it
2017-10-19 13:23:14 GMT <AFaust> Oh - correction: This looks good https://github.com/Alfresco/alfresco-repository
2017-10-19 13:23:15 GMT <alfbot> Title: GitHub - Alfresco/alfresco-repository (at github.com)
2017-10-19 13:24:10 GMT <douglascrp> AFaust, but now it seems it will be harder to find the pieces, but that is ok
2017-10-19 13:24:18 GMT <douglascrp> it is just a matter of getting using to it
2017-10-19 13:24:22 GMT <AFaust> But be aware, there won't be a "global 5.2 tag" - each module will have its own tags / versions and you need to check what a specific 5.2 WAR contains
2017-10-19 13:24:23 GMT <angelborroy> https://community.alfresco.com/docs/DOC-6385-project-overview-repository
2017-10-19 13:24:25 GMT <alfbot> Title: Project Overview: Repository | Alfresco Community (at community.alfresco.com)
2017-10-19 13:24:59 GMT <douglascrp> angelborroy, that one... tks
2017-10-19 13:25:09 GMT <douglascrp> AFaust, yes, I noticed that
2017-10-19 13:25:13 GMT <douglascrp> tks anyway
2017-10-19 13:26:36 GMT <douglascrp> AFaust, wow, the alfresco-repository now has tags up to 6.8
2017-10-19 13:40:23 GMT <yreg> douglascrp, FYI you are better off instructing your IDE to download all source code
2017-10-19 13:40:31 GMT <yreg> and lookup what you need from there
2017-10-19 13:40:59 GMT <angelborroy> yreg can you perform “Search in files…” over downloaded source code from inside your IDE?
2017-10-19 13:41:19 GMT <douglascrp> yreg, yes, nice tip
2017-10-19 13:42:49 GMT <yreg> @angelborroy, I do that all the time with intellij
2017-10-19 13:42:56 GMT <yreg> it's a matter of changing scope
2017-10-19 13:43:04 GMT <angelborroy> yreg I have to move to IntelliJ
2017-10-19 13:43:23 GMT <angelborroy> yreg I’m using an external notepad for that, as I cannot find the feature in Eclipse
2017-10-19 13:43:25 GMT <yreg> angelborroy, I would expect that from eclipse as well, any decent IDE actually
2017-10-19 13:44:48 GMT <yreg> angelborroy, sounds like there is an eclipse plugin for that https://github.com/ajermakovics/eclipse-instasearch
2017-10-19 13:44:49 GMT <alfbot> Title: GitHub - ajermakovics/eclipse-instasearch: Eclipse plug-in for fast code search (at github.com)
2017-10-19 13:45:17 GMT <angelborroy> thanks, I’ll take a look
2017-10-19 13:45:42 GMT <yreg> angelborroy, https://www.codota.com/ might be a more mature alternative
2017-10-19 13:45:43 GMT <alfbot> Title: AI Pair Programmer | Codota (at www.codota.com)
2017-10-19 13:46:39 GMT <yreg> but it does not look in sources, it looks online instead for implementation and example usage
2017-10-19 13:46:55 GMT <yreg> I have a colleague using it with rather positive feedback
2017-10-19 13:48:00 GMT <angelborroy> or I can move to IntelliJ :D
2017-10-19 13:48:15 GMT <angelborroy> probably I’m too old for such a movement…
2017-10-19 13:57:27 GMT <yreg> douglascrp, I ended up tweaking uploader plus to get that value assistance thingy to work
2017-10-19 13:57:47 GMT <yreg> would you mind reviewing it if I push it now ?
2017-10-19 13:58:25 GMT <douglascrp> yreg, really? that is nice
2017-10-19 13:58:33 GMT <douglascrp> yes, push it and I will take a look
2017-10-19 14:00:35 GMT <yreg> can you start by mergin my pending PR from few months back ?
2017-10-19 14:00:51 GMT <douglascrp> yreg, aren't already there?
2017-10-19 14:01:07 GMT <douglascrp> I remember about the one with the "apply same properties for all files"
2017-10-19 14:01:19 GMT <yreg> douglas they got in and out when you merged something twice
2017-10-19 14:01:28 GMT <douglascrp> it has been a long time since I checked it
2017-10-19 14:02:06 GMT <douglascrp> yreg, wow, I missed that one
2017-10-19 14:02:16 GMT <douglascrp> I got no notification for that one
2017-10-19 14:02:37 GMT <yreg> https://github.com/softwareloop/uploader-plus/pull/125
2017-10-19 14:02:38 GMT <alfbot> Title: Re-apply commit 421b7d4 which was overridden by a merge by yregaieg · Pull Request #125 · softwareloop/uploader-plus · GitHub (at github.com)
2017-10-19 14:02:48 GMT <douglascrp> yes, I am looking at it now
2017-10-19 14:03:24 GMT <douglascrp> yreg, it is done
2017-10-19 14:03:27 GMT <yreg> thanks
2017-10-19 14:03:37 GMT <douglascrp> sorry dude, I really missed that one
2017-10-19 14:03:43 GMT <yreg> no worries
2017-10-19 14:04:10 GMT <douglascrp> I want to see what you had to do make it work with the value-assistance
2017-10-19 14:04:14 GMT <douglascrp> curious :D
2017-10-19 14:04:26 GMT <douglascrp> clean fix or, you know....
2017-10-19 14:05:19 GMT <douglascrp> wow, there are even more issues there that I was not informed about
2017-10-19 14:06:49 GMT <douglascrp> ok
2017-10-19 14:06:57 GMT <douglascrp> sorry... wrong window :D
2017-10-19 15:01:04 GMT <alfbot> sujaypillai: Sent 1 day, 8 hours, and 20 minutes ago: <yreg> that is probably possible (using some js console hacking and the folder quotas addon), but I would expect that to be not performant. Depending on your usecase I can suggest more robust alternatives: 1 if you have a set of hosted clients and you want to make sure they do not exceed purchased quota then you can create a cron running every night (or even hour) executing this statement https://stackoverflow.com/a/35177383/2307988
2017-10-19 15:01:05 GMT <alfbot> sujaypillai: Sent 1 day, 8 hours, and 20 minutes ago: <yreg> to verify repo usage for all users
2017-10-19 15:30:23 GMT <yreg> douglascrp, done !
2017-10-19 15:30:38 GMT <yreg> https://github.com/softwareloop/uploader-plus/pull/128
2017-10-19 15:30:39 GMT <alfbot> Title: Address Issue 127 by yregaieg · Pull Request #128 · softwareloop/uploader-plus · GitHub (at github.com)
2017-10-19 15:47:46 GMT <yreg> douglascrp, once you check the PR, let me know if you think it was sloppy I already deployed it to acceptance, but won't take it to prod until I get feedback from you
2017-10-19 16:37:57 GMT <douglascrp> yreg, cool
2017-10-19 16:38:04 GMT <douglascrp> I will take a look at it
2017-10-19 16:49:24 GMT <douglascrp> yreg, it seems to be ok, but I don't have an environment to test it
2017-10-19 16:49:52 GMT <douglascrp> is that test environment we used another day still available? and is it using this new version already?
2017-10-19 16:53:55 GMT <douglascrp> yreg, ok, I decided to test, and I saw it is there, and it is working well
2017-10-19 16:54:15 GMT <douglascrp> yreg, I have one question though... there is no way to test it when there are more than 2 different type options to choose
2017-10-19 16:54:35 GMT <douglascrp> I remember about a problem when you selected type A for the first document, and type B for the second, for example
2017-10-19 16:55:10 GMT <douglascrp> sometimes, it happened that both documents were uploaded with the same type, not sure if the first or the last one (I am almost sure that it was the last one selected)
2017-10-19 16:55:17 GMT <douglascrp> I would like to test that
2017-10-19 16:55:36 GMT <douglascrp> can you add a second option just for this quick test?
2017-10-19 16:55:38 GMT <douglascrp> yreg, ^
The other logs are at http://esplins.org/hash_alfresco