Chuyển đến nội dung chính

[CQ FORM] Change default encoding in CQ configuration / UTF-8 in CQ Form

The issue:

We might get encoding error while validate form in 2 cases:
- Reload the form if validation fail.
- Save form data into database.

The solution:

Go to system console management: /system/console/configMgr
Search "Apache Sling Main Servlet"
Set "UTF-8" in field "Default Parameter Encoding"

Nhận xét

Bài đăng phổ biến từ blog này

How to custom CQ Login Module

In order to manage the login process in our project, we will use a custom CQ Login Module. We will admit the root URL of CQ instance is: http://localhost:4502/ . This value may change depending of your environment. The %CQ_HOME% variable we will mention refers to the CQ install path. It admits you have defined %CQ_HOME% as an environment variable. 1.         Update the repository definitions The login module must be referenced in the repository definitions. You have to edit the next file: %CQ_HOME%/crx-quickstart/repository/repository.xml Do a copy of repository.xml to repository.xml.original In repostiory.xml, replace  security  part of repository.xml with following: <Security appName="com.day.crx">         <SecurityManager class="com.day.crx.core.CRXSecurityManager"> <WorkspaceAccessManager class="org.apache.jackrabbit.core.security.simple.SimpleWorkspaceAccessManager"/>  ...

[DAM] Custom DAM management / Add 'Alt' into images

Issue: We need, for each asset to be able to edit the ‘alt’ text. The ‘alt’ text must be used on the site each time an asset is displayed. When displaying an asset, the mechanism is the following : -       Get the Locale from the request -       When getting the asset, get the associated Alt property corresponding to the locale. -       Populate the alt attribute with this value. Resolution: To achieve this, we can customize the DAM Asset Editor. The AssetEditor is the form used to input asset properties and metadata. Below is a screenshot of a customized form with four “alt” input (for four different locales). The DAM uses the following nodes to render Asset Editor forms: -       /libs/dam/content/asseteditors/formitems -       /libs/dam/content/asseteditors/images/formitems -      ...

[CONFIGURATION] Configure the dispatcher for CQ

Go to https://www.adobeaemcloud.com/content/companies/public/adobe/dispatcher/dispatcher.html Download the dispatcher corresponding to apache2 version. Here we downloaded file dispatcher-apache2.4-linux-x86-64-4.1.8.tar.gz for ubuntu 14.04 64bit. After download finish, we extract this file. Install apache2 (Ubuntu): sudo apt-get install apache2 Copy file dispatcher-apache2.2-4.1.8.so into /usr/lib/apache2/modules (need sudo) Copy file dispatcher.any into /etc/apache2/conf, and modify the render to: /renders      {      /rend01        {        # Hostname or IP of the render        /hostname " localhost "        # Port of the render        /port " 4502 "        # Conne...