alfresco / alfresco-community-share Goto Github PK
View Code? Open in Web Editor NEWAlfresco Share
Home Page: http://docs.alfresco.com/6.0/concepts/gs-intro.html
License: GNU Lesser General Public License v3.0
Alfresco Share
Home Page: http://docs.alfresco.com/6.0/concepts/gs-intro.html
License: GNU Lesser General Public License v3.0
When editing a rule with an action which has a boolean parameter, the error is thrown which prevents proper form rendering (especially "Save" button action is not assigned).
TypeError: paramValue.toLowerCase is not a function
at Alfresco.RuleConfigActionCustom._convertType (rule-config_4a306578c85215e54534b99e5391c237.js:2023:31)
at Alfresco.RuleConfigActionCustom._createCheckbox (rule-config_4a306578c85215e54534b99e5391c237.js:1596:37)
at Alfresco.RuleConfigActionCustom.edit (rule-config_4a306578c85215e54534b99e5391c237.js:1375:28)
at Alfresco.RuleConfigActionCustom.RuleConfig__createConfigParameterUI [as _createConfigParameterUI] (rule-config_4a306578c85215e54534b99e5391c237.js:950:40)
at Alfresco.RuleConfigActionCustom.RuleConfig__createConfigUI [as _createConfigUI] (rule-config_4a306578c85215e54534b99e5391c237.js:772:15)
at Alfresco.RuleConfigActionCustom.RuleConfig_displayRulConfigs [as displayRuleConfigs] (rule-config_4a306578c85215e54534b99e5391c237.js:394:18)
at RuleEdit_constructor.RuleEditUtil_displayRuleConfigs [as displayRuleConfigs] (rule-config-util_c10402243abfc520abac3eaed8927dd7.js:290:21)
at RuleEdit_constructor.RuleEdit_displayRule [as displayRule] (rule-edit_e5e6ad389f43182b4768920572895dbf.js:383:15)
at RuleEdit_constructor.RuleEdit_onRuleConfigsReady [as onRuleConfigsReady] (rule-edit_e5e6ad389f43182b4768920572895dbf.js:344:18)
at RuleEdit_constructor.RuleEditUtil_onRuleConfigReady [as onRuleConfigReady] (rule-config-util_c10402243abfc520abac3eaed8927dd7.js:173:15)
In the rule-config.js file in the _convertType() function in the "d:boolean" if, add the following code:
if (typeof paramValue === "boolean") {
return paramValue;
}
rule-config.js
Tested on Alfresco Community 7.2.0.
It seems the connected error has been already reported by the Seng Liaw (MNT-22238) and @alexbalmus tried to fix it here which is the cause of this error.
@alexbalmus boolean values from "Set property" action are strings, whereas boolean values from action parameters are boolean values - probably this led to the mistake.
MNT-20685 commit made by @antoniojfelix introduced a bug, where a file is downloaded two times ( firstly to JS, secondly to client).
It creates 2x bigger server load and a client have to wait 2x longer. It is especially visible on the bigger files.
As a fix, in the Pdfjs.js file in the downloadIfLoggedIn() function I propose to check if url contanis the "alfresco-noauth" and for the logged in validation, "/touch" API can be used.
Sample code:
downloadIfLoggedIn : function PdfJs_downloadIfLoggedIn(url)
{
// check if site is shared
// if yes, always download, no matter of the login state
if(url.includes("/alfresco-noauth/"))
{
window.open(url, "_blank");
return;
}
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (this.status === 401)
{
// user is logged out, reload should move to login page
window.location.reload();
}
else if (this.readyState == 4 && this.status == 200) {
window.open(url, "_blank");
}
};
// check if user has been logged out
request.open("GET", Alfresco.constants.PROXY_URI + "touch", true);
request.send();
}
Using the code above, there might be a problem with a 301 redirect and CORS protection (i.e. when using external auth).
Alfresco 7.2. and onwards.
Add "offline_acess" to the scope for oAuth.
See line:
Reason:
Provider such as Authentik does require the client to request "offline_acess" to send a refresh token. See https://docs.goauthentik.io/docs/providers/oauth2/#refresh_token
I can of course create a PR, but it is a very simple change.
Se also Alfresco/alfresco-community-repo#2513
i tried to connect with username admin and password admin on alfresco share page but it is not working
I am unable to compile alfresco-community-share project. I tried on 2 machines, using different tags. I tried to follow CONTRIBUTING.md but it seems to be outdated.
It only worked while using Java from ORACLE (proprietary one)
mvn clean package
output:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war (default-war) on project share: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
[ERROR] ---- Debugging information ----
[ERROR] message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
[ERROR] cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
[ERROR] cause-message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
[ERROR] class : org.apache.maven.plugin.war.util.WebappStructure
[ERROR] required-type : org.apache.maven.plugin.war.util.WebappStructure
[ERROR] converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
[ERROR] path : /webapp-structure
[ERROR] version : null
[ERROR] -------------------------------
mvn -v
output:
Maven home: /usr/share/maven
Java version: 11.0.13, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.13.0-28-generic", arch: "amd64", family: "unix"
I've found many similar threads ( 1, 2, 3, 4 )
Specifying 2.6
maven-war-plugin version does not seem to work
I tried to search a document in Alfresco and, when i searched the document with the complete name (example: Project Overview.ppt), it appears in the search, but when I take one character out (Project Overview.pp), it doesn't appear in the share.
MNT-22612 commit introduced a bug, where a document-details button link in the shared page is invalid - "example.com/share/s/Encode.forHtmlAttribute(/share/page/quickshare-redirect?id=XXX)"
Proposed change in the share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/quickshare/header.get.html.ftl line 32:
<a href="${linkButton.href?xhtml}" class="brand-button ${linkButton.cssClass!""}" tabindex="0">${linkButton.label?xhtml}</a>
I guess @rrajoria tried to used OWASP Encode utility but it is not available on the Freemakrer's side. Such an expression should also be inside Freemarker's expression ${}
. Anyway, ?xhtml
should be enough to protect against XSS
While Share is working fine in Safari and Firefox we experience multiple major display issues in Chrome. Almost all labels are displayed as the variable name. It also prevents navigation trough pages since the pagination module is not displayed at all. - No errors in the browser console.
Original: #1 (comment)
In Alfresco Share 7.1 version, some parts of Share always shows texts in english, even when the browser locale is Brazillian Portuguese:
Using 6.2 it works just fine, it never happened:
For the record, i'm using Angel's docker installer: https://github.com/Alfresco/alfresco-docker-installer/
I couldn't figure out what's going on... I'm assuming it's a bug in Share. Thanks!
In Alfresco Share 7.1 version, some parts of Share always shows texts in english, even when the browser locale is Brazillian Portuguese:
Using 6.2 it works just fine, it never happened:
For the record, i'm using Angel's docker installer: https://github.com/Alfresco/alfresco-docker-installer/
I couldn't figure out what's going on... I'm assuming it's a bug in Share. Thanks!
In case anyone else is having this problem, just configure Java locale and that will solve the problem...
-Duser.country=BR -Duser.region=BR -Duser.language=pt -Duser.timezone=America/Sao_Paulo
The indicated solution works, after inserting in alfresco and share conatainers.
however the display will always be in the informed language, and it changes the date patterns.
Any hope for a fix?
I tested it in version 7.3.0-M2, and it has the same error.
In Alfresco Share 7.1 version, some parts of Share always shows texts in english, even when the browser locale is Brazillian Portuguese:
Using 6.2 it works just fine, it never happened:
For the record, i'm using Angel's docker installer: https://github.com/Alfresco/alfresco-docker-installer/
I couldn't figure out what's going on... I'm assuming it's a bug in Share. Thanks!
It is currently impossible (as far as I can see) to clone this project by a member of the community (i.e. to prepare a PR) due to the inclusion of test data by TAS which is separately resolved / downloaded via git-lfs, failing on missing permissions.
Repeated result of clone attempts (including one with an attempt to ignore the path via .gitignore
on a parent path):
D:\Alfresco>git clone [email protected]:Alfresco/alfresco-community-share.git
Cloning into 'alfresco-community-share'...
Enter passphrase for key '/c/Users/axelf/.ssh/id_rsa':
remote: Enumerating objects: 229637, done.
remote: Counting objects: 100% (8733/8733), done.
remote: Compressing objects: 100% (3159/3159), done.
remote: Total 229637 (delta 5297), reused 8463 (delta 5139), pack-reused 220904
Receiving objects: 100% (229637/229637), 193.96 MiB | 13.57 MiB/s, done.
Resolving deltas: 100% (128640/128640), done.
Updating files: 100% (9546/9546), done.
Downloading alfresco-tas-share-test/testdata/Video2.WMV (87 KB)
Error downloading object: alfresco-tas-share-test/testdata/Video2.WMV (a4bf038): Smudge error: Error downloading alfresco-tas-share-test/testdata/Video2.WMV (a4bf038cf8d0ca93c9acd30395406b5e968d3e5743d2ad68e798fdcccd0c783d): batch request: [email protected]: Permission denied (publickey).: exit status 255
Errors logged to 'D:\Alfresco\alfresco-community-share\.git\lfs\logs\20230106T123652.9598694.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: alfresco-tas-share-test/testdata/Video2.WMV: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
I have created one user. When I log in to the admin console as "admin" to see my users, the table only shows an error and no users. I can see in the dev console that I'm getting a 404. See screenshots.
When I log in as the user I am able to view and edit my profile.
I am running Alfresco7.2 Community edition installed with Ansible. Cent OS 7, Python 3.8.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.