+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Rolling back corrupt template - Sitefinity 8.2

Rolling back corrupt template - Sitefinity 8.2

3 posts, 0 answered
  1. Troy Benedict
    Troy Benedict avatar
    37 posts
    Registered:
    29 Apr 2009
    08 Feb
    Link to this post

    I made an update to the navigation control on a template that is used by about 75% of the pages on my site, and in doing so, I'm unable to make any changes, delete the control from the page, or find an option to roll back the template to a previous version.  

    What are my options?  Is it possible to recover to an earlier version of a template, or remove the control in question from my page on the backend (via DB)?  

    I've tried accessing the page through a variety of different browsers, and nothing seems to allow me to edit any of the layout options, when trying to edit the template.  

  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    09 Dec 2016
    11 Feb
    Link to this post
    Hi,

    The most common cause for such a problem is a JavaScript error. Since the edit wrappers around the layout controls and around the widgets are created using JavaScript an error would stop the code from executing and thus prevent the widgets from being editable.

    One of the most common causes for such JavaScript errors is referencing jQuery explicitly in a template. For example the following line would cause such errors:

    <script src="//code.jquery.com/jquery-1.12.0.min.js"></script>

    If required by the specific widget you can refer to the following documentation article for the proper way to add jQuery as a dependency to your widgets: http://docs.sitefinity.com/81/for-developers-include-css-javascript-and-jquery-resources-in-new-user-widgets#include-sitefinity's-built-in-jquery-resource

    Please inspect the template of the modified widget and see if that is the case. If not you can refer to the following documentation about removing widgets from a page programmatically: http://docs.sitefinity.com/81/for-developers-remove-a-control-from-a-page

    To make it work for page templates instead of pages use the GetTemplates and EditTemplate methods of the page templates.

    Regards,
    Velizar Bishurov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Troy Benedict
    Troy Benedict avatar
    37 posts
    Registered:
    29 Apr 2009
    11 Feb in reply to Velizar Bishurov
    Link to this post
    Thank for the info.  I was able to regain control over the template by going into the widget menu and deleting the one I had created.  It was a little shocking to see how easy it was for a corrupt control to bring down the entire site for the most part.  I'll be careful with custom controls in the future, especially those added to the templates.  
3 posts, 0 answered