Posts Tagged ‘a’


UPDATING A BASIC ASSET IN FATWIRE:

Though BASIC ASSETS are not meant to be changed after creation, sometimes, we may require to UPDATE the existing BASIC ASSETS that we have created earlier in FATWIRE CONTENT SERVER. This may be due to the requirement for changing the naming conventions, update existing attributes of the asset type, remove existing attributes, add new attributes to the asset type, etc.

This updating of the basic asset should be done with care, so that, the existing assets will not be affected.  If you need to update the basic assets, you need to follow the below guidelines:

  1. Open the CONTENT SERVER EXPLORER, and open the ASSETTYPE table. This table contains the ASSETTYPEs that are created in the Fatwire Content Server (Both System and User defined).
  2. Open the appropriate ASSET DESCRIPTOR FILE (ADF), by double-clicking on the file in the “URLDESCRIPTOR” field of the table.
  3. Update the ADF. Save it. Save the Content Server Explorer’s Table. You can do a SAVE ALL.
  4. Run any scripts, that need to update the database (if required). In most of the cases, there is no need (Atleast, in my case).
  5. Register the Assets from the Fatwire’s Advanced Interface (ADMIN -> ASSET TYPES -> APPROPRIATE ASSET ).

That’s it.. The UPDATE OF BASIC ASSETS has been completed.

If you see any weird messages in the existing assets, make sure that you have executed the above procedure properly.

Advertisements

When we create a site in alfresco share, and start inviting users to the site, the following error will be displayed “0 invites sent, 1 failure”.  This message leaves us to a bit of frustration, after creating sites, users, and when thinking of inviting users to the sites. This article gives the resolution for such a type of error message.

This error occurs because, the Outbound E-mail Configuration has not been set in alfresco-global.properties file. The quick turnaround for this issue would be to add a few lines of code to the alfresco-global.properties file, and add another file outboundSMTP-context.xml, if it doesn’t already exist.

Add the following to alfresco-global.properties file:

//Add to the end of alfresco-global.properties file
# Email settings mail.host=smtp.1and1.com mail.port=465 mail.protocol=smtps mail.username=XXX mail.password=XXX mail.encoding=UTF-8    mail.smtps.auth=true mail.smtps.starttls.enable=true
//END

If a file named outboundSMTP-context.xml doesn’t exist in C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\email\OutboundSMTP folder, then add the following file and name it as outboundSMTP-context.xml

//  <bean id="mailService">          <property name="host">              <value>${mail.host}</value>          </property>          <property name="port">             <value>${mail.port}</value>         </property>       <property name="protocol">         <value>${mail.protocol}</value>      </property>          <property name="username">              <value>${mail.username}</value>           </property>         <property name="password">              <value>${mail.password}</value>         </property>          <property name="defaultEncoding">             <value>${mail.encoding}</value>         </property>       <property name="javaMailProperties">          <props>               <prop key="mail.smtps.auth">${mail.smtps.auth}</prop>             <prop key="mail.smtps.starttls.enable">${mail.smtps.starttls.enable}</prop>          <prop key="mail.smtp.socketFactory.port">${mail.smtp.socketFactory.port}</prop>          <prop key="mail.smtp.socketFactory.class">${mail.smtp.socketFactory.class}</prop>           <prop key="mail.smtp.socketFactory.fallback">${mail.smtp.socketFactory.fallback}</prop>          </props>      </property>     </bean>

Now, restart alfresco and try inviting users. After inviting the users in share, it should display the following message “1 invites sent, 0 failure”.


If you have a requirement of using the Flex Family, and render the text stored in Blobs, this example would definitely help you.

For example, if you want to allow the user to enter a Huge text (that would not fit according to the normal RDBMS standards), then this concept of blobs can be used. Following are the steps that need to be done in order to successfully create and render the blob.

  • Create a flex attribute “text” with BLOB  as the Value Type, and if you want to specify any attribute editors like FCKEditor, EWebEditPro, etc, then specify them as well.
  • Enable that attribute in the Flex Definition, so that it becomes a part of the flex asset, and will be visible in the asset creation form.
  • Now, the content you enter in the form will be stored in the file system, instead of being stored in the database system.

After creation of the asset, the next thing to do is coding the template that renders the blob which we have created earlier.

  • In the import section of the jsp, import the blobservice tag library:
        <%@ taglib prefix="blobservice" uri="futuretense_cs/blobservice.tld"%>
  • Load the asset:
        <assetset:setasset name="myasset" id='<%=ics.GetVar("cid")%>' type='<%= ics.GetVar("c")%>'/>
  • Load the attribute from the asset
        <assetset:getattributevalues name="myasset" typename="PageContent_A" attribute="text"
                  listvarname="Textfile"/>
  • Render the blob:
      <ics:listloop listname="Textfile" maxrows='<%=ics.GetVar("rows")%>'>
                 <ics:listget listname="Textfile" fieldname="blobvalue" output="textvalue"/>
                 <blobservice:readdata id='<%=ics.GetVar("textvalue")%>' listvarname="Textdata"/>
                 <render:stream list="Textdata" filecolumn="urldata"/>
      </ics:listloop>

In the preview of your website/page, the text should be rendered.