2012.11.12 Page Cloning - tooltwist/documentation GitHub Wiki

Please Note: This fix requires corrective action to be performed.

A problem has been reported cloning a page multiple times results in corruptions. From Carlo Adona:

You can replicate it by:

  1.   Create a page widget, add a page JS and CSS – approve this page widget  
    
  2.   Modify the page in #1  - approve this page  
    
  3.   Modify the page in #2 – approve this page  
    
  4.   Clone #3 – approve this page  
    
  5.   Clone #4 – approve this page  
    
  6.   Do this scenario multiple times  
    

Observe the file structure for those widgets. I think you can use your local to replicate the scenario.

The cloning functionality is most commonly used when creating scratch and new versions of a widget. In making the changes described above, it was noticed that several file adjustments were not taking place:

  1. A defined in conf.xml is not cleared out.

  2. The "status=approved" file from the widget being cloned is copied across. This status is ignored because the new widget is a scratch version, but the copied status file brings with it the history of the original widget.

  3. CSS and Javascript files for pages are named widgetName.css and widgetName.js. These files are not being renamed during the clone, resulting in the page snippets disappearing. Editing them will result in default page snippets.

What the script does

How to use the patch