« Back to Documentation Errata

Errata for the Liferay Portal 5.2 Systems Development

Liferay Book: Liferay Portal 5.2 Systems Development

Preface

in page 4,

Geronimo + T0omcat
should be
Geronimo + Tomcat

Introducing Liferay Portal Architecture and Framework #

Working with JSR-286 Portlets #

ServiceBuilder and Development Environments #

In page 66,

-Xms128m -Xmx1024m -XX:MaxPermSize=128m
should be
-Xms128m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT 
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false}}} (refer to http://issues.liferay.com/browse/LPS-4338 )

In page 71,

-Xms128m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT
should be
-Xms128m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT 
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false}}}

Page 75 says "copy build.${user.name}.properties to the ext project from the portal project". This sentence should be removed, since there is no need to copy build.${user.name}.properties to the ext project from the portal project. It works in Eclipse IDE, but it raises issue in NetBeans.

Page 80, "struts-config.xm" should be "struts-config.xml".

In page 90, "For example, if the plugin is a portlet called ipc-faqportlet, then the plugin context file must be called ipc-faq-portlet.xml," should be "For example, if the plugin is a portlet called ipc-faq-portlet, then the plugin context file must be called ipc-faq-portlet.xml in the folder $PLUGINS_SDK_HOME/portlets/ipc-faq-portlet/,"

Experiencing Struts Portlets #

In pages 95, 101 (and 138, 152, 232, 240, 249, 478), remove following lines

<resource-bundle>
com.liferay.portlet.StrutsResourceBundle </resource-bundle>}}}

When using downloading code, do the same.

The "com.liferay.portlet.StrutsResourceBundle" is no longer in use for portlets as plugins, although it is working fine for portlets in the Ext. Obviously, it does not cause any issues in 5.2; but it will throw exceptions in 5.3 or above.

In page 109,

ActionMapping mapping, ActionForm form, ortletConfig
should be
ActionMapping mapping, ActionForm form, PortletConfig

In page 114,

com.ext.portlet.reports.model.impl
com.ext.portlet.reports.service.base com.ext.portlet.reports.service.http}}} should be
com.ext.portlet.bookreports.model.impl
com.ext.portlet.bookreports.service.base com.ext.portlet.bookreports.service.http }}}

In page 115,

com.ext.portlet.reports.service.impl
com.ext.portlet.reports.service.persistence }}} should be
com.ext.portlet.bookreports.service.impl
com.ext.portlet.bookreports.service.persistence }}}

public static ReportsEntry addBook(ActionRequest req)
should be
public static BookReportsEntry addBook(ActionRequest req)

Page 122, the BookReportsEntry method is missing the “entryId” declaration.

Page 129, "com.ext.portlet.reports.model.ReportsEntry" should be "com.ext.portlet.bookreports.model.BookReportsEntry".

Page 131, “addEntryResources(ReportsEntry book” should be “addEntryResources(BookReportsEntry book".

Page 131, “ReportsEntry.class.getName()” should be “BookReportsEntry.class.getName()”.

Page 141, “portlonfig” should be “portletConfig”.

Page 145, "modifierUserId" is incorrectly typed as a String. It should be a long; and remove the line ‘<column name=”creator” type=”String” />’.

Page 160, "ExtEditLayoutAction.java" should be "ExtEditPagesAction.java".

Page 161, “0extLayout” should be “extLayout”.

Managing Pages #

Customizing the WYSIWYG Editor #

In page 181, "By the way, the default toolbar sets Default and Basic in the /fckconfig.js folder besides the fckconfig.jsp file."

should be

"By the way, the default toolbar sets Default and Basic in fckconfig.js file besides the fckconfig.jsp file."

In pages 181 and 182, "FCKeditor/" should be "fckeditor/";

In page 183, "FCKeditor.jsp" should be "fckconfig.jsp";

/ext/ext-web/docroot/html/js/editor/FCKeditor
should be
/ext/ext-web/docroot/html/js/editor/fckeditor

In page 186, it mentions the theme book-street-theme, but the code is available only in the chapter 9. It should add code about book-street-theme in chapter 6, too.

In page 197 the following line should be removed.

<link href="alternatives.css" type="text/css" rel="stylesheet" />

in page 222, it should add detailed information - how to install cms_sercies.war and bookpub.sql after the line "Note that the default database name is bookpub and the default account on this database is lportal/lportal. MySQL is the default database."

(for cms services)

download cms_services.war at http://liferay.cignex.com/palm_tree/book/
copy cms_sercies.war to the folder $TOMCAT_HOME/webapps

(for database)

download bookpub.sql at http://liferay.cignex.com/palm_tree/book/
mysql>create database bookpub;
mysql>grant all on bookpub.* to 'lportal'@'localhost' identified by 'lportal' with grant option;
mysql>grant all on bookpub.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option;
>mysql -u lportal -plportal -f bookpub <bookpub.sql

Customizing CMS and WCM #

Page 232, the following lines should be removed.

<supports>
<mime-type>application/vnd.wap.xhtml+xml</mime-type> </supports>}}}

Page 233,

<configuration-action-class>
com.portlet.journalcontent.action.ConfigurationActionImpl </configuration-action-class>}}}

should be

<configuration-action-class>
com.liferay.portlet.journalcontent.action.ConfigurationActionImpl </configuration-action-class>}}}

Page 242, the following line should be removed.

GroupLocalServiceUtil.getGroup(groupId);

Page 243, following lines

if(type == null || type.length() == 0){ 
	type = (String) renderRequest.getAttribute("articleType");
}

should be

<%
if(type == null || type.length() == 0){ 
	type = (String) renderRequest.getAttribute("articleType");
}
%>

The download code is correct.

On page 254:

viewFullContentURL.setParameter("urlTitle", articleDisplay.getArticleId());

should be:

viewFullContentURL.setParameter("urlTitle", articleDisplay.getUrlTitle());

In page 253, why do we add this as a comment? it is going to make the form "Add Asset ..." invisible, according to the requirements mentioned in this chapter. You may need this form for your requirements - just uncomment the form.

Page 254, "bstract.jsp" should be "abstract.jsp".

Page 256 , “Create a package named com.ext.portal.service.impl in the /ext/extimpl/ src folder; create a class ExtVelocityToolServiceImpl, and then add service methods implementation as follows:”

should be

“Create a package named com.ext.portal.service.impl in the /ext/extimpl/ src folder; create a class ExtVelocityToolServiceImpl, which implements ExtVelocityToolService, and then add service methods implementation as follows:”

The downloading code is correct like:

public class ExtVelocityToolServiceImpl implements ExtVelocityToolService { ...

Page 263,

public List<TagsAsset> getRelatedArticles(String companyId, String
groupId, String articleId, int limit){
return _extVelocityToolService.getRelatedArticles(companyId,
groupId, articleId, limit);}

should be

Public List<JournalArticle> getRecentArticles(String companyId, String
groupId, String articleId, int limit){
return _extVelocityToolService.getRelatedArticles(companyId,
groupId, articleId, limit);} 

Building a Personalized Community #

In page 312, "Create an XML file service.xml in the package com.ext.portlet.comment and open it." should be "Create an XML file service.xml in the package com.ext.portlet.user and open it."

Developing Layout Templates and Themes #

Building My Social Office #

In pages 377 and 378,

/ext/ext-impl/docroot/html/
should be
/ext/ext-web/docroot/html/
and
/portal/portal-impl/docroot/html/
should be
/portal/portal-web/docroot/html/

In page 388,

"%><p><%= subc1 %></p><p><%= subc3 %></p><p><%= subc3 %></p><%"
should be
"%><p><%= subc1 %></p><p><%= subc2 %></p><p><%= subc3 %></p><%".

The code attached is correct.

In page 390,

"The code above shows registration of the book-street-theme theme"

should be

"The code above shows registration of the so-theme theme"

In page 412, a set of .portal.jsp files cannot be generated in runtime properly. The so-portlet throws exceptions.

<liferay-util:include page="/html/portlet/calendar/
view_event.portal.jsp" />

The same issue exists in the downloading code. This issue will get fixed shortly.

Finally updates of so-portlet and so-theme are available (for 5.2.x) at

http://liferay.cignex.com/palm_tree/book/so-portlet.war

http://liferay.cignex.com/palm_tree/book/so-theme.war

Or use Liferay-portal 5.2.3 plus SO portlet and SO theme from http://liferay.cignex.com/palm_tree/book/liferay-portal-5.2.3-so.zip

Note that the port: 9090; account: admin/admin

Staging and Publishing #

Using Common API #

In pages 476,

/portal/portal-web/docroot/html/portal/enterprise_admin
should be
/portal/portal-web/docroot/html/portlet/enterprise_admin

Additional links:

[Full Integration - Liferay, Alfresco, SSO and LDAP]

[Integrate Solr with Liferay portal]

[Errata for the Liferay Portal 6 Enterprise Intranets]

0 Attachments
39754 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments
Threaded Replies Author Date
I have to give you major props for writing... Mickey Fox August 13, 2009 6:59 AM
Hi Jonas, there is an issue on page 243 code is... Daniel M Scott August 19, 2009 7:08 AM
Thank you, Daniel. You are right. Just updated... Jonas Yuan August 20, 2009 3:46 PM
On page 253 you advise to add this line as a... Daniel M Scott August 24, 2009 3:05 AM
Thank you, Daniel. The code exists in... Jonas Yuan August 26, 2009 6:18 AM
Where should I post issues related to build... John Joseph Ryan September 21, 2009 5:06 PM
Hi John, thank you. You can post the issue at... Jonas Yuan September 22, 2009 11:50 AM
at page 109 it is written "ActionMapping... ilke Muhtaroglu November 3, 2009 11:05 PM
at Page 115 at section "Creating methods to add... ilke Muhtaroglu November 3, 2009 11:05 PM
Thank you, Ilke. Just added this in the Book... Jonas Yuan November 9, 2009 5:38 PM
Hello Jonas, there is a typo on page 233.... Nischala Kale January 7, 2010 1:13 PM
Thank you, Nischala. Just added this in the... Jonas Yuan January 7, 2010 3:55 PM
According to your book Liferay 5.2 development... Hermann yao February 12, 2010 7:53 AM
Hi Hermann, thank you. Could you please list... Jonas Yuan February 13, 2010 8:08 AM
It is in Chapter 4. Precisely in the part... Hermann yao February 16, 2010 2:24 AM
I wanted to say thank you very much instead of... Hermann yao February 19, 2010 3:45 AM
Thank you, Hermann. This is interesting. I... Jonas Yuan February 23, 2010 7:31 AM
Not sure if anyone is answering this still. But... William B July 21, 2010 6:16 AM
page 379, in Liferay 5.2.3 the first line of... jm mayer July 28, 2010 7:48 AM
Hi Jonas, On page 254: ... Diego Ballve August 5, 2010 5:06 AM
one more, errata on errata: on page 263 ... Diego Ballve August 5, 2010 5:42 AM
Thanks, Diego. Jonas Yuan December 21, 2010 8:08 AM

I have to give you major props for writing these books for such a dynamic and evolving project. In fact, I am quite amazed at the brevity of the errata sheet.

Technical writing is difficult enough to begin with. Good Job!

Kudos Jonas.
Posted on 8/13/09 6:59 AM.
Hi Jonas, there is an issue on page 243 code is written as:

<%@ include file="/html/portlet/journal_articles/init.jsp" %>
if(type == null || type.length() == 0){
type = (String) renderRequest.getAttribute("articleType");
}

However i believe it should be:
<%@ include file="/html/portlet/journal_articles/init.jsp" %>
<% if(type == null || type.length() == 0){
type = (String) renderRequest.getAttribute("articleType");
}%>

Otherwise the if statment appears as text in the top of the ext web content list.
Posted on 8/19/09 7:08 AM.
Thank you, Daniel. You are right. Just updated the same in book wiki page.
Posted on 8/20/09 3:46 PM in reply to Daniel M Scott.
On page 253 you advise to add this line as a commnet
<!-- <%@ include file="/html/portlet/ext/asset_publisher/add_asset.jspf" %> -->

However this file doesnt exist in the ext asset_publisher structure so the page isnt found and throws an error in the code when watching via tomcat, why do we add this as a comment? and can you let me know how to fix the issue.
Posted on 8/24/09 3:05 AM.
Thank you, Daniel. The code exists in downloaded code.

Why do we add this as a comment? it wants to make the "Add Asset ..." invisible, according the requirements mentioned in this chapter. You may need this form for your requirements - just uncomment the form.
Posted on 8/26/09 6:18 AM in reply to Daniel M Scott.
Where should I post issues related to build errors of the code that comes with the book.
My issue is related to user permissions.
Posted on 9/21/09 5:06 PM.
Hi John, thank you. You can post the issue at blogs: http://www.liferay.com/web/jonas.yuan/blog/-/blogs/liferay-book%3A-liferay-porta­l-5-2-systems-development, or in forums; I will follow up your post. Please inform me your posts :-).
Posted on 9/22/09 11:50 AM in reply to John Joseph Ryan.
at page 109 it is written "ActionMapping mapping, ActionForm form, ortletConfig" "ortletConfig" should be "PortletConfig" ;)
Posted on 11/3/09 11:05 PM.
at Page 115 at section "Creating methods to add and retrieve records" the method addBook is expected to return ReportsEntry but it returns BookReportsEntry ! the method signature should be corrected to according to the returned type BookReportsEntry !! Otherwise the Type ReportsEntry is from other reports portlet Project !
Posted on 11/3/09 11:05 PM.
Thank you, Ilke. Just added this in the Book errata page.
Posted on 11/9/09 5:38 PM in reply to ilke Muhtaroglu.
Hello Jonas, there is a typo on page 233.
<configuration-action-class> should be
com.liferay.portlet.journalcontent.action.ConfigurationActionImpl

The book is missing the 'liferay' part in the package declaration.

Thanks
Nischala
Posted on 1/7/10 1:13 PM.
Thank you, Nischala. Just added this in the Book errata page.
Posted on 1/7/10 3:55 PM in reply to Nischala Kale.
According to your book Liferay 5.2 development system in Chapter 4. The tutorial explains that any user can not add book above button to add book is not visible at the Home of Portal. But, when he seized the title and he valid entry with the key. The recording is actually registered. how I can fix this bug?
Thank you
Posted on 2/12/10 7:53 AM in reply to Jonas Yuan.
Hi Hermann, thank you. Could you please list the page numbers? Thus make sure that we are in the same page. Thanks, Jonas.
Posted on 2/13/10 8:08 AM in reply to Hermann yao.
It is in Chapter 4. Precisely in the part dealing with permissions (beginning page 126 to page 131). Also, in the erratum you say " in pages 95, 101 (and 138, 152, 232, 240, 249, 478), remove following lines : <resource-bundle>
com.liferay.portlet.StrutsResourceBundle
</resource-bundle> without problem. This is not true in my case. When I remove these lines from my portlet-ext.xml. The portlet titles of all concerned become null in the frontend. Think very much. i would like to became Jedi here. lol
Posted on 2/16/10 2:24 AM in reply to Jonas Yuan.
I wanted to say thank you very much instead of think vey much. My mother tongue is French
Posted on 2/19/10 3:45 AM in reply to Hermann yao.
Thank you, Hermann. This is interesting. I should update the same same in the book Wiki page.
Posted on 2/23/10 7:31 AM in reply to Hermann yao.
Not sure if anyone is answering this still.
But on page 115 (chap4), advanced struts portlet, the query to create the table doesn't contain the "UserName" column... but it's refered to in all the other files...
Posted on 7/21/10 6:16 AM in reply to Jonas Yuan.
page 379, in Liferay 5.2.3 the first line of the sample code doesn't work as the method getManageableOrganizations is no longer a method.
Posted on 7/28/10 7:48 AM.
Hi Jonas,

On page 254:
viewFullContentURL.setParameter("urlTitle", articleDisplay.getArticleId());
should be:
viewFullContentURL.setParameter("urlTitle", articleDisplay.getUrlTitle());

br, Diego
Posted on 8/5/10 5:06 AM.
one more, errata on errata: on page 263
public List<TagsAsset> getRelatedArticles(...)
Do not change it. Method signature is correct even though method name is missleading. VM template expects TagAsset.
Posted on 8/5/10 5:42 AM in reply to Diego Ballve.
Thanks, Diego.
Posted on 12/21/10 8:08 AM in reply to Diego Ballve.