liferay,hook,liferay-6 , Liferay 6.2 Hook deployment strange behaviour


Liferay 6.2 Hook deployment strange behaviour

Question:

Tag: liferay,hook,liferay-6

I have deployed a document library hook which includes many jsp files under custom_jsps.

Recently, I wanted to change folder_action.jsp, so I changed it and deployed it normally in document library portlet. As it was expected, a folder_action.portal.jsp was created containing the original file.

However, I've noticed something strange. After stopping Tomcat both folder_action.jsp and folder_action.portal.jsp are deleted(this is not happening for the other files that come from the hook), and when it is up again a really strange thing happens. The folder_action.portal.jsp contains the changed file and the folder_action.jsp is the original file.

Has anyone met something similar ever? Any help would be appreciated.


Answer:

You might run into a very nasty issue: You must only override a particular jsp from exactly one hook. If you override the same jsp from two different hooks, the scenario that you describe might happen (on undeploy). Worse: Order is not maintained, you might have some "wrong" files left over.

Find the two hooks that override the same jsp and determine which you like better (or merge the two). Find some more horror in this answer to a similar question


Related:


Register multiple EventHandlers for one portlet


event-handling,liferay,portlet
I would like to register more than one EventHandler in a Portlet in my portlet.xml. Right now it looks like this: When trying to add a second block of init-param i get an error: Than i tryed to add multiple EventHandler in one init-param block, but i get this error:...

How to ignore Liferay user removed from LDAP errors?


ldap,log4j,liferay,liferay-6,openldap
I have a Liferay 6.1 instance that is connected to LDAP. New users get imported nicely, but when I remove a user from the LDAP directory, Liferay starts throwing exceptions when it tries to sync users from LDAP. These seem to be safe to ignore, but they produce several megabytes...

Form submit portlet with Spring MVC


java,jsp,spring-mvc,liferay,portlet
I'm trying to achieve a Liferay portlet of submit form using spring MVC. The model: package com.model; public class Person { String firstName; String middleName; public String getFirstName() { return this.firstName; } public String getMiddleName() { return this.middleName; } public void setFirstName(String firstName) { this.firstName=firstName; } public void setMiddleName(String middleName)...

Service builder doesn't delete table in DB


liferay,liferay-6,liferay-service-builder
Hi all, I'm using LR 6.1. I created a new entity Called " Recommendation" in service.xml then a run BuildServices with Ant to generate the service builder Files. Now I want to delete the Entity. So I Deleted if from service.xml, but nothing happens in Data base and the other...

Liferay Migrating User from legacy database & LDAP


liferay,liferay-6.2
I am migrating data into Liferay from legacy database for which I have written script to programmatically push data into Liferay's user as I see fit. Now authentication happens with LDAP and some basic details of user are also in LDAP which is supposed to be synced. Will it cause...

Engineyard Deployment: How to detect in deployhooks that its the first attempt to execute 'rake db:seed'


ruby-on-rails,deployment,hook,engineyard
I am having trouble to detect that this is the first attempt of deployment after a server instance is booted. I need to run the command rake db:seed only the first time to set the default users and other details in database. I have no idea if this is possible....

How to upload file in relative directory


java,liferay
I have made a application where we can upload any file which will save in our local given directory. I want to modify it, i want to add a drop down (with multiple option i.e floor, store, section) for department. i.e if we want to upload a file in 'Store'...

AJAX Call not working in liferay 6.2.2?


ajax,liferay,hook,liferay-6
I am trying to perform a AJAX Call. But what i get is ResourceURL as undefined when i see the error in chrome. Below is my code. Declaration: <liferay-portlet:resourceURL copyCurrentRenderParameters="<%= false %>" var="mainURL" /> Implementation: xhr2.open("POST", resourceURL , false); But at implmentation i get resourceURL as undefined. In 6.1 it...

OpenGL reading back buffer quickly


c++,opengl,hook
I'm trying to read the contents of the back-buffer into a buffer of my own. glReadPixels by itself is way too slow and drops my FPS from 50 to 30. So I decided to try the "asynchronous" read with a PBuffer but it crashes. My code is as follows: If...

how to bypass the necessity of having to have email address firstname and lastname in liferay to import authenticating users


ldap,liferay
My application uses liferay to connect to LDAP server and import authenticating users. But many of the user records in the ldap schema doesn't have email id. This seems to be preventing me from importing these users as liferay requires email id, among other things, inorder to successfully import new...

How can I configure AOP in Liferay Service Builder?


liferay,aop
I want to to intercept a method in Service Builder, for example: XXXLocalService.update(). But I don't know the correct way to do this. I have done some research but I haven't found a clear way to do this. Any help will be greatly appreciated....

Update a post without update post title


wordpress,wordpress-plugin,hook,posts
I want to update post data without update post title even if user change the post title. For this functionality I have write the following codes. But it's not working. My code is as follows : function update_post_without_update_title($post_id,$data) { $post = get_post($post_id); if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )...

In liferay market place, I am unable to submit the project


liferay,liferay-6
In Liferay market place i am stuck at the place "Upload Liferay Plugin Packages " When ever i am trying to upload a war file Please help me to short it out :)...

How to check for real liferay user after altering the request through Burpsuite


cookies,request,liferay
I'm doing some vulnerability check on Liferay by using Burpsuite. Through burpsuite, i changed the Get: request and the cookie Cookie: JSESSIONID=8415D05C1E66F72CE8803607B6FEC26B.node1; COOKIE_SUPPORT=true; USER_UUID="2n3duSU0cr8TgknmHzm8ghmRUS2LVJfx6zmuvGFspuY="; GUEST_LANGUAGE_ID=en_US; LFR_SESSION_STATE_2983586=1431672874448; COMPANY_ID=10154; ID=79307664464f436b414f657133626843444f577a65773d3d; from one user to another. The page then loads as if the user is the other user which i copied the request...

Liferay workflow Flow(ie:Kaleo WorkFlow)


liferay
I have a requirement.We have a form where we create users in liferay and it should go through approval process(ie:single approver).If the omni admin fills that form then the user must not go through approval process and when the same form is accessed by any other user it must go...

How manage styles in Vaadin portlet in Liferay


css3,liferay,vaadin,portlet
I have a Portlet, where is used Valo theme. Most graphical components are displayed properly, but TextField not. It should have rounded border radius and height should be about 35px. It has normally about 15px and the field is angular. When I narrow width of browser window to about 200px...

Get list of users in liferay


liferay
I want to display users list on liferay. and I am having problem with it. Here is my action class. public void userList(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException { // Todo Logic for user code try { int countUser = UserLocalServiceUtil.getUsersCount(); log.info("User Present In DB" + countUser); List < User...

Customize CreateAccountAction in Liferay Portal


liferay,liferay-ide,liferay-hook
I'm trying to add "User Group" Selection field while creating a user (Self User Registration form - create_account.jsp). Here Custom fields is not helpful because Usergroup is already exists in db. I want to insert into existing Users_UserGroups table. I'm using below hook: But User is not added in the...

ignore certain mercurial commands in mercurial hook


python,mercurial,hook
I have a mercurial hook like so: [hooks] pretxncommit.myhook = python:path/to/file:myhook with the code looking like this: def myhook(ui, repo, **kwargs): #do some stuff but this hook runs on commands that use the commit logic to do something else, in my case hg shelve. is there a way to get...

How to create service builder for liferay plugin project with maven


liferay,liferay-ide,liferay-service-builder
I have Already create Liferay Plugin project. and maven install also over. it gives ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] --------------------------------------------------------------------- [INFO] Total time: 1:29.773s [INFO] Finished at: Wed Jun 17 15:46:10 IST 2015 [INFO] Final Memory: 34M/151M [INFO] -----------------------------. But unable to add service builder. When i try to add...

Customizing My Sites portlet in Liferay


liferay
I want to customize My Sites portlet (which is out of box portlet) in liferay using ext. How do I do this? How do I get the source code for the my sites portlet?

Portlet event send array of objects


arrays,events,liferay,portlet
We have multiple projects with multiple portlets and need to send an array of objects between them. Our situation: One of the porlets is like a "Master-portlet", it will be responsible for all the REST-calls and consume json-data and parse it to Java-Objects. All the other portlets will receive an...

Incorrect liferay-plugins dependency


gradle,dependencies,liferay,liferay-6.2
In https://github.com/liferay/liferay-plugins/blob/6.2.x/build-plugins.gradle#L9 following dependency is defined: dependencies { classpath group: "com.liferay.portal", name: "portal-service", version: "7.0.0-SNAPSHOT" } How can a 6.2.x version have a dependency on 7.0.0 version? Is it a bug? When I peek to the history of the file, the dependency has always been there. I am not able...

How to host a newportal instance in liferay


liferay,liferay-6
I have created a new portal instance in liferay. I want to host it in my local Ubuntu machine. What i have done is created a WEB ID as newportal.com Virtual host as www.newportal.com and the mail domain as newportal.com thanks...

How to pass data from page to Portlet class through AJAX call?


ajax,jsp,liferay,portlet
I'm trying to pass a value in an AJAX 'GET' request to my Portlet class, but I can't quite figure out a way to access such variable's value in the class. My AJAX code is: function loadXMLDoc() { var nocache = new Date().getTime(); var xmlhttp=new XMLHttpRequest(); var url = "${mURL}";...

Cannot get my post-commit script to run (git)


git,hook
I want my remote git-repo to create a zip file from one folder in the master branch every time someone pushes. I renamed the post-commit.sample file and added the following: #!/bin/bash echo "creating zip" /usr/local/bin/git archive --format=zip --output=~/the-folder.zip master:the-folder echo "creating zip done" When I commit from my client I...

pyinstaller hooks never called


python,hook,pyinstaller
I am trying to create an EXE of a python program. The program is quite complex and cannot be listed here. I have some user defined modules, halfwave, halfwave.utils and halfwave.db. I need to create a hook for these modules, so I have made files hook-halfwave.py, hook-halfwave.db.py and halfwave.utils.py and...

Customizing liferay Calendar portlet


liferay,liferay-6,liferay-ide
I'm trying to customize Calendar portlet using this below instructions. https://www.liferay.com/it/documentation/liferay-portal/6.2/development/-/ai/creating-plugins-to-extend-plugins-liferay-portal-6-2-dev-guide-03-en Its basically creating Plugins to extend plugins. In order to achieve above, I need "Calendar-portlet.war" . I don't find any war file for calendar portlet for my version. So i decided to build myself. Then i downloaded Portal plugins...

Liferay Maven Service Builder Portlet(Developer Studio)


java,maven,liferay,liferay-ide
I am new in Liferay platform. I am trying to implement CRUD in Liferay using portlet. I am using liferay 6.2 and IDE as a developer studio. I am creating project with below values (In Image) in developer studio. When I am creating project in Developer studio I am getting...

Text internationalization in Javascript using liferay-ui:message


javascript,internationalization,liferay
How can I do internationalization for this : alert('<liferay-ui:message key="please-choose-file-type" />'); Notice that I want to internationalize the message inside Alert using Liferay:ui:message tag. Thanks....

Mediawiki Call hook function from another file


php,function,hook,mediawiki
Hello I need to save some content to database in MediaWiki when a new page is created. So I added hook in my LocalSettings.php: $wgHooks['PageContentSaveComplete'][] ='assign_responsibility'; But I need to call the function assing_responsibility() from a extension php file Responsibility.php not LocalSettings. I am new at Mediawiki system and I...

Android trims the rest of the deep link URI after ampersand


android,android-intent,android-manifest,hook,deep-linking
I'm trying to add yet another deep link to my android application, I want my URI to look like this : my_app://photos?id=147619727001201&edit=true. The problem is that the system doesn't recognize this URI, so I just get trimmed version of it (my_app://photos?id=147619727001201). I'm just curious how android system treats deep links,...

Difference between Liferay Mobile SDK and Liferay Screens


mobile,liferay,liferay-6
Can someone tell me the difference between Liferay Mobile SDK and Liferay Screens? Thanks a lot....

Account onLogin hook Meteor loop


javascript,login,meteor,hook,account
I am building an application using Meteor. I want to create a new Cart ID (to act as a cart where I can store items) each time a user logs into my application. However, every time I open a new page in the application, a new Cart ID is created....

Cons of a liferay cms while website development using Community Edition


content-management-system,liferay
I am new to LIFERAY CMS. i need cons of a liferay cms i.e., difficulties faced while developing and using liferay cms. can you please list cons of liferay cms.

How to delete a portlet in Liferay 6.1 programmatically from code


java,javascript,java-ee,liferay,liferay-6
I'm working on Liferay 6.1 I want to delete a portlet in Liferay 6.1 from my code. What I have done so far is: <a onclick="Liferay.Portlet.close('#p_p_id_28_'); return false;">Remove</a> Above code is working fine. But it is working on the current page only i.e. it can delete the portlet(s) which is...

Users in Guest role see default theme instead custom one for given layouts


liferay,liferay-6,liferay-theme
Users in Guest role see default theme instead custom one for pages which inherit from defined custom theme. This seems to be very strange problem. Even though layouts have specified to inherit theme from parent theme: Use the same look and feel of the Public Pages. Guests see them as...

Apache Subversion pre-commit to restrict files


apache,svn,hook,pre-commit
I'm new to Apache SVN and I need some help to use a pre-commit script to filter which files are being upload to my repository. I was searching a lot and found this script on another question, but it didn't work for me. #!/bin/bash REPOS=$1 TXN=$2 AWK=/usr/bin/awk SVNLOOK="/usr/bin/svnlook"; #Put all...

How can I change the zIndex attribute of aui-datepicker in Liferay Portlet 6.2


datepicker,liferay,z-index,liferay-aui,alloy-ui
I have discoveder one problem with date field in portlet in LF 6.2. The problem is that after clicking on the input field, the datepicker is displaying, but with zIndex=0, that means it is under the portlet. If I change on firebug that parameter to 1, everything is OK. I...

Include ftl file in ext plugin


maven,liferay,liferay-6
I have ext-plugin and I would like to override this file: portal-impl\src\com\liferay\portlet\dynamicdatamapping\dependencies\ddm\documentlibrary.ftl. After maven build, this file isn't include in my porta-impl-ext.jar. In my portal-impl-ext's pom.xml I have this code: <build> <plugins> <plugin> <groupId>com.liferay.maven.plugins</groupId> <artifactId>liferay-maven-plugin</artifactId> <version>${liferay.maven.plugin.version}</version> <configuration>...

Getting StackOverflow exception while reading stringlist in newly hooked LoadResString method


delphi,winapi,hook,resourcestring
For reference - following is my code, where I am getting StackOverflow exception in NewLoadResString function. The case is like I have creted two stringlist i.e. RecStrNameIdMap and NewStringValueList. Here RecStrNameIdMap is hash string list to store name and string Identifier mapping. So that I can refer Resource string name...

commandButton action method not invoked in Liferay


jsf,liferay,portlet
I've the below portlet view.xhtml: <?xml version="1.0"?> <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:body> <h:form> <h:commandButton value="TESTButton" action="#{navigationViewBean.submit}" /> <h:outputText value="TESTGetter: #{navigationViewBean.testField}" /> </h:form>...

How to pass HTTP request to Web-Service


ajax,web-services,liferay,liferay-6,portlet
From my portlet JSP, I am trying to make a Ajax call to web-service. My aim is to pass HTTP request object as a parameter to web-service method. Please suggest.

Does'nt Liferay work at different ports?


liferay,server,portal
I have developed a portal page using Liferay and the port number is 8080. I wanted to test SSO, I decided not to try with the existing one as there might be some problems and I might end up crashing the whole thing. As a result I downloaded a new...

Lifefay freemarker ADT: methods unavailable?


java,liferay,liferay-6,freemarker
I'm trying to work on some ADT for asset publisher (Documents and Media type), but I often have a message telling me that : Expression assetRenderer.getDataRepositoryId is undefined or Expression assetRenderer.getFileEntryId is undefined I found some threads where people said that we must add velocity.engine.restricted.classes= velocity.engine.restricted.variables= freemarker.engine.restricted.classes= freemarker.engine.restricted.variables= in portal-ext.properties...

I am working on a MVC Portlet and the document i am saving is not going to db


liferay,liferay-6
Here is my Action Class, where I have to save any document to database but its not working and getting error in console that NoSuchMethodException (javax.portlet.ActionRequest, javax.portlet.ActionResponse) package com.test.docupload; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; import javax.portlet.PortletException; import com.liferay.counter.service.CounterLocalServiceUtil; import...

Keep liferay-ui:search-container while paging


liferay,liferay-6.2
I have a <liferay-ui:search-container> displaying my results. I enabled a rowChecker, so that each row becomes selectable by a check box. It is placed in a form; in this way users can select more rows, then click on my "submit" button and the action is able to get ids of...

Identify that the logged in user is an administrator or not using velocity


liferay,liferay-6,liferay-theme
I would like to identify that the logged in user is an administrator or not using velocity. The goal is to show the dockbar to the administrator user(s) only. I have tried following code, but is not working for me: #if ($is_signed_in && $permissionChecker.isGroupAdmin($group_id)) #dockbar() #end Please help me!!!...

Why does using a function pointer to call a function bypass the hook?


c++,hook,detours
Using the Microsoft Detours library, I've written the following simple code: #include <Windows.h> #include <detours.h> #include <stdio.h> void RealFunc(int num) { printf("RealFunc %d\n", num); } void(*RealFuncPtr)(int) = &RealFunc; void HookedFunc(int num) { printf("HookedFunc %d\n", num + 100); // RealFunc(num); // This starts an infinite loop because it calls HookedFunc which...