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

2017-11-06 07:39:15 GMT <mtsiak> hi all. Where are the connectors "http" and "alfresco" defined? (the ones in share-config-custom.xml)

2017-11-06 08:34:42 GMT <yreg> Morning guys

2017-11-06 08:35:06 GMT <yreg> mtsiak, probably in springsurf

2017-11-06 08:35:09 GMT <yreg> not sure though

2017-11-06 08:35:53 GMT <alfbot> bhagyas: Sent 2 days, 18 hours, and 34 minutes ago: <digcat> have you seen this snap tool on ubuntu ?

2017-11-06 08:35:58 GMT <yreg> you might want to look it up a bit here (this is not in sync) https://github.com/yregaieg/spring-surf

2017-11-06 08:35:59 GMT <alfbot> Title: GitHub - yregaieg/spring-surf: Spring-surf, forked from : https://svn.alfresco.com/repos/alfresco-open-mirror/services/surf/trunk (at github.com)

2017-11-06 09:39:02 GMT <bhuvana_> Hi all

2017-11-06 09:42:21 GMT <bhuvana_> I am trying to print a log message when I am clicking on the Reassign button in my workflow task. I have written logger message in task-edit-header.js but it is not printing any logger although the logger is enabled.

2017-11-06 10:31:24 GMT <AFaust> bhuvana_: Can you provide your code via a paste service?

2017-11-06 10:32:24 GMT <AFaust> The "logger" object that you may see documented for Alfresco is a server-side logging utility that is not available in client-side files like task-edit-header.js. Using that "logger" object is a common mistake people new to Alfresco make...

2017-11-06 10:43:46 GMT <bhuvana_> https://pastebin.com/5QGHAQAW

2017-11-06 10:43:47 GMT <alfbot> Title: /** * Copyright (C) 2005-2013 Alfresco Software Limited. * * This file is - Pastebin.com (at pastebin.com)

2017-11-06 10:50:46 GMT <angelborroy> bhuvana_ https://developer.mozilla.org/en-US/docs/Web/API/Console/log

2017-11-06 10:50:47 GMT <alfbot> Title: Console.log() - Web APIs | MDN (at developer.mozilla.org)

2017-11-06 10:50:57 GMT <AFaust> bhuvana_: Yes, as I suspected. You are using the "logger" object which is not available in client-side files. In Share you use the "Alfresco.logger" object instead

2017-11-06 10:51:20 GMT <AFaust> Or - as angelborroy mentions - you can always use the default console object

2017-11-06 10:51:26 GMT <angelborroy> AFaust which is the difference between “console.log” and “Alfresco.logger”?

2017-11-06 10:52:22 GMT <AFaust> Alfresco.logger is a log4javascript instance

2017-11-06 10:52:32 GMT <yreg> angelborroy, I suppose that the latter is wrapping console.log giving the possibility to enable/disable/filter logging through the use of share-config-custom.xml

2017-11-06 10:52:33 GMT <AFaust> http://log4javascript.org

2017-11-06 10:52:34 GMT <alfbot> Title: log4javascript - a JavaScript logging framework (at log4javascript.org)

2017-11-06 10:53:36 GMT <AFaust> I don't believe that log4javascript "just wraps" the console

2017-11-06 10:54:18 GMT <AFaust> I believe it is a remnant from the time that not all browsers supported the console object

2017-11-06 10:55:11 GMT <yreg> AFaust, I did not say just, but your explanation is obviously better informed :)

2017-11-06 10:55:42 GMT <AFaust> Yeah, the quote was not meant as a literal quote, but a short summary of the basic idea

2017-11-06 11:10:58 GMT <yreg> fcorti, When should we expect feedback on our submissions (Accepted/waitlist)

2017-11-06 11:11:10 GMT <fcorti> morning yreg

2017-11-06 11:11:29 GMT <yreg> :) Morning Francesco !

2017-11-06 11:11:30 GMT <fcorti> The plan says next week.

2017-11-06 11:12:07 GMT <fcorti> Today the Selection Committee will meet but I don't think they will finish today.

2017-11-06 11:12:26 GMT <fcorti> Let's have an update at the end of the week.

2017-11-06 11:13:34 GMT <yreg> fcorti, that would be really nice...

2017-11-06 11:15:14 GMT <fcorti> luckily the majority of the Selection Committee is here: AFaust, angelborroy, resplin, (often) david webster. We miss only Brian Remmington. :-)

2017-11-06 11:26:12 GMT <bhuvana_> I I have tried "console.log" and "Alfresco.logger" but none of this worked for me. Please check https://pastebin.com/jwViKsi0

2017-11-06 11:26:14 GMT <alfbot> Title: task-edit-header.js - Pastebin.com (at pastebin.com)

2017-11-06 11:28:11 GMT <bhuvana_> @AFaust

2017-11-06 11:29:47 GMT <AFaust> bhuvana_: Please specify "none of this worked for me", i.e. how did you check if they worked?

2017-11-06 11:30:25 GMT <bhuvana_> I am checking in alfresco logs

2017-11-06 11:34:17 GMT <yreg> 🤦

2017-11-06 11:35:05 GMT <angelborroy> bhuvana_ Browser > More Tools > Developer Tools > Console

2017-11-06 11:43:52 GMT <bhuvana_> AFaust,angelborroy: I am unable to get message in the console. How can I know if the function is called? Can you please point me in the code where I am wrong?

2017-11-06 11:44:57 GMT <angelborroy> if you use “console.log” or “Alfresco.looger”, you’ll see the message in JavaScript Console by using the browser

2017-11-06 11:45:13 GMT <angelborroy> you can include diferents messages (or even “alerts”) to debug your code

2017-11-06 11:45:20 GMT <AFaust> bhuvana_: With regards to "Alfresco.logger" - you do not call the object directly (it is an object, not a function) but use it like in Log4J, i.e. do a "Alfresco.logger.debug('MyMessage');" call

2017-11-06 11:46:39 GMT <AFaust> It always pays to make yourself familar with the Alfresco code and look for examples there. I.e. here: https://svn.alfresco.com/repos/alfresco-open-mirror/web-apps/Share/trunk/web-framework-commons/src/main/webapp/js/alfresco.js

2017-11-06 11:47:17 GMT <AFaust> There are multiple uses of the Alfresco.logger utility in that file

2017-11-06 11:57:44 GMT <bhuvana_> @ AFaust wether the function will call or not by clicking on the reassign button can u pls give me the confirmation on that one

2017-11-06 11:58:59 GMT <AFaust> Well, the function is called "onReassignButtonClick", so I would say "yes"

2017-11-06 11:59:58 GMT <AFaust> The problem is, when you have an error in your call to Alfresco.logger before the function is bound to the button, then it will not work...

2017-11-06 12:00:35 GMT <AFaust> And that is where your incorrect call "Alfresco.logger("Bhuvana"+task.isReassignable);" comes in - it breaks the binding of the function to the button

2017-11-06 12:01:27 GMT <AFaust> But you'd see that error in the Developer Tools -> Console that angelborroy mentioned

2017-11-06 12:02:12 GMT <bhuvana_> can u pls tell me how to make the how can i check the button click function is working or not i written all the logger kind of things eventhough it's not calling

2017-11-06 12:02:49 GMT <bhuvana_> I checked in the console also by inspecting element

2017-11-06 12:03:37 GMT <bhuvana_> once it will give a logger message than my intention is getting the user name from the args

2017-11-06 12:32:24 GMT <bhuvana_> if (task.isReassignable) { Alfresco.logger.debug("Bhuvana args"); // Task is reassignable this.widgets.reassignButton = Alfresco.util.createYUIButton(this, "reassign", this.onReassignButtonClick); Dom.removeClass(Selector.query(".actions .reassign", this.id), "hidden"); }

2017-11-06 12:32:39 GMT <bhuvana_> onReassignButtonClick: function TEH_onReassignButtonClick(layer, args) { Alfresco.logger.debug("Bhuvana args"); this.widgets.peopleFinder.clearResults(); this.widgets.reassignPanel.show(); },

2017-11-06 12:32:58 GMT <bhuvana_> @ AFaust: Please correct me?

2017-11-06 12:33:26 GMT <AFaust> That looks correct now...

2017-11-06 12:33:49 GMT <AFaust> You should also use the script debugger provided by your browser to check for such issues...

2017-11-06 15:10:27 GMT <douglascrp> good afternoon

2017-11-06 15:21:35 GMT <yreg> Hi douglascrp !

2017-11-06 15:21:39 GMT <yreg> How it goes ?

2017-11-06 15:21:50 GMT <douglascrp> yreg, hey dude

2017-11-06 15:21:57 GMT <douglascrp> everything is ok here

2017-11-06 15:22:03 GMT <douglascrp> yreg, how about you?

2017-11-06 15:22:53 GMT <yreg> fine fine overall

2017-11-06 15:26:56 GMT <yreg> I am currently between projects, with a lot of leftover small tasks/issues to close

2017-11-06 15:27:11 GMT <douglascrp> yreg, same here

2017-11-06 15:27:28 GMT <douglascrp> but those small issues sum up and become big problems :D

2017-11-06 15:29:18 GMT <yreg> indeed

2017-11-06 15:52:15 GMT <owerfelli> Hi all, I wanna know if can I access alfresco-global.properties values from a share webscript

2017-11-06 15:53:10 GMT <yreg> owerfelli, you are not supposed to do that

2017-11-06 15:53:49 GMT <yreg> that file is meant for configuring the repo side, not share

2017-11-06 15:54:48 GMT <yreg> in some particular cases you might need to create a new repo webscript to expose parts of the alfresco-gloabal properties to share but that's not always the best way to address this

2017-11-06 15:55:13 GMT <owerfelli> thanks, but is there a manner to create some property and use it in share ?

2017-11-06 15:55:26 GMT <yreg> You should be able to get more informations about this from Zied, AFAIK he tried to do the same thing not that long ago

2017-11-06 15:55:33 GMT <yreg> so he must have some lesson learnt

2017-11-06 15:56:03 GMT <yreg> owerfelli, that's what share-config-custom.xml is meant for (configuring share)

2017-11-06 15:56:23 GMT <yreg> but it definitely has a different structuring from properties files

2017-11-06 16:07:01 GMT <owerfelli> Haha, I can't reach him today

2017-11-06 16:07:27 GMT <owerfelli> the case is that I want to save some information to connect to another server, so I don't think that share-config-custom.xml is useful in my case

2017-11-06 16:07:47 GMT <AFaust> yreg, overfelli: Well, you could use a community addon that provides a share-global.properties file.... ;)

2017-11-06 16:09:29 GMT <AFaust> Since I want to be able to have simple flags for "apply patch XY" I created such a feature in https://github.com/Acosix/alfresco-utility#share-tier

2017-11-06 16:09:30 GMT <alfbot> Title: GitHub - Acosix/alfresco-utility: Project to consolidate abstract utility features and enhancements / safe fixes that may be used by multiple Alfresco addons (at github.com)

2017-11-06 16:10:31 GMT <AFaust> But that is definitely non-standard, and the module comes with other things that you might not want (at least all can be individually disabled)

2017-11-06 16:16:30 GMT <yreg> AFaust, not sure if that's relevant, but he probably is on 4.2.c

2017-11-06 16:17:45 GMT <AFaust> Ok - share-global.properties support would work with this, but the module would need to be built with JDK 7 instead. And the Aikau-related patches would need to be disabled...

2017-11-06 16:23:19 GMT <owerfelli> thanks all, I think I will expose the needed part of alfresco-global.properties with a repo webscript

End of Daily Log

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