PT Comments Upgrade v2.1

From ADF Docs
Jump to: navigation, search

Back to PT Comments

Overview

This guide is to upgrade the PT Comments v1.0 to v2.1.


ADF Application Code Review

This is only for reviewing the code that is in the "/ADF/apps/" directory, not at the site level.

  1. Download the application from the Community project page.
  2. Unzip the application zip folder.
  3. Analyze the updated app code compared to the current app code on your server.
    1. Identify any customizations that you have made to the application code to make sure these are not overwritten by the app update.
    2. A great tool to use is Beyond Compare to compare the new and current file to identify the exact lines of code that have been changed.
  4. Once this is complete, then move your app customizations into the new app code package.

Application Code

  1. Rename directory "/ADF/apps/pt_comments" to "/ADF/apps/pt_comments_v1.0".
  2. Rename file "/ADF/apps/pt_comments_v1.0/appBeanConfig.cfm" to "/ADF/apps/pt_comments_v1.0/appBeanConfig.cfm.old".
  3. Move the PT Cimments v2.1 into the "/ADF/apps/pt_comments/" directory.
  4. Reset the ADF

Site Level Customizations Review

This is only for reviewing the site level customizations in the "/_cs_apps/pt_comments/" directory, not in the ADF directory.

  1. Analyze the updated app code compared to the app customization code on your server.
    1. Identify any customizations that you have made to the application code to make sure these are updated with any functionality.
    2. Again, Beyond Compare is a good tool to compare the new and current file to identify the exact lines of code that have been changed.
    3. This is important for components that have customized functions to the site level "/_cs_apps/". The best practice is to identify the function that have been customized and compare with the new app function to identify any updates. A good help is to check the function comment header to see if any updates have been made.
  2. Once completed, Reset the ADF.


App Configuration

For v2.1, the primary change that occurred was a bug fix requiring updates to potentially the .HEAD file and to a filter on pages where the Comment element exists.

If you added the following code to your site's .HEAD file:

<cfset request.params.comments.contentDataPageID = request.page.id> 

you will need to modify the .HEAD and change the code to the following:

<cfset request.comments.contentDataPageID = request.page.id>

Next, you will need to change the render mode filter on any page or template where the comments element is used:

  1. Update the render mode on the Comments element
    1. Select "Display existing element data (content reuse)"
    2. Select "Render results dynamically based on a filter, or display all records."
    3. click on filter
    4. select "Subset of records"
    5. in the dropdown select Comments.contentDataPageID
    6. Set the comparison to equals
    7. click the ... next to the value
    8. change request.params.comments.contentDataPageID to request.comments.contentDataPageID
    9. Sort Order: dateTimePosted ASCENDING
    10. click save
  2. submit your page