edit this page - page history - about editing

Alfresco

Alfresco is a content management system for Tomcat and written in Java.

Adding Calendars, Wikis and Blogs to a Site

You can't add calendars, wikis or blogs to an Alfresco site through the Explorer application; they can only be added (and used) with the Share application.

To add the content, go to the site in Share, select More > Customise Site, and then drag content from the Available Site Pages.

Liferay Integration into a Subfolder

It's impossible to specify Liferay to use a subfolder of Alfresco for its site. For example:
dl.store.cmis.system.root.dir=Root Folder/Folder 1/Folder 2/Liferay Home
This results in the error:
Invalid property value:
   Constraint: 11200014 Value 'Root Folder/Folder 1/Folder 2/Liferay Home' is not valid as a file name. This property must be a valid file name.

Disabling Javascript Minification in Alfresco

As discussed here, to enable Javascript debugging (and to disable the minification of Alfresco Javascript), add this code to webscript-framework-config-custom.xml for Alfresco explorer:
<config>
  <flags>
    <client-debug>true</client-debug>
  </flags>
</config>
For Alfresco Share, the relevant file is <tomcat>/shared/classes/alfresco/web-extension/share-config-custom.xml.

Call to undefined function alfresco_repository_access()

You may get this error when trying to install the Alfresco 6.x module within Drupal 6.x.

This is caused by not having the alfresco module enabled; but even if you specifically enable it, it still may fail.

The root cause is that the SOAP extension may not be enabled; enable it in your php.ini and try enabling the Alfresco module again.
extension=php_soap.dll

To disable Drupal modules that are enabled but cause your site to crash (so you can't disable them), see Drupal.

ReferenceError: "json" is not defined.

If you get this error while trying to call a Remote Alfresco API script, such as the following:
var clientRequest = json.toString();
var result = remote.connect("alfresco").post("/api/foo/" + encodeURIComponent(user.id) + "/profile/edit",
  clientRequest, "application/json");
The problem is that you need to specify application/json as a content type and re-encode the page arguments to JSON like so:
var clientRequest = page.url.args;
var result = remote.connect("alfresco").post("/api/foo/" + encodeURIComponent(user.id) + "/profile/edit",
  jsonUtils.toJSONString(clientRequest), "application/json");

"userhome" is not defined.

userhome is only defined for webscripts within the Alfresco Explorer interface, and _not_ the Alfresco Share interface. I think the common way to solve this is to write an API interface (using JSON), i.e. your Alfresco Share-based app will call the Alfresco Explorer-based app to modify/create content within userhome.

Redirecting

To redirect from within an FTL script:
// redirect
status.location = url.context + "/page/redirect";
status.code = 302;
status.redirect = true;

The choice of Java constructor replace matching JavaScript argument types (function,string) is ambiguous; candidate constructors are: class java.lang.String replace(char,char), class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence)

Instead of using this:
	return s.replace(/[\\]/g, "\\\\")
		.replace(/[\"]/g, "\\\"");

First try casting it to a "Javascript" string, like so:
	return (s + "").replace(/[\\]/g, "\\\\")
		.replace(/[\"]/g, "\\\"");

Importing JQuery into an Alfresco Share page

You need to add an import for the JQuery library in the xxx.get.head.ftl template, for example:
<@script type="text/javascript" src="${page.url.context}/res/jquery/jquery-1.6.2.js"></@script>

Correct Format for the Alfresco d:date Data Type

The correct String format for an instance of the d:date data type is the full ISO8601 date format with milliseconds and timezone offset explicitly provided, i.e. 2005-09-16T17:01:03.456+01:00.

The following values will not work:

Categories: Alfresco | Java | Hubnet | Javascript | Drupal | Tomcat | J2EE | JSON

edit this page - what links to here? - page history - top
Last edited by jevon jevon 2 months ago