Editor sometimes buggy

Posted by Community Admin on 03-Aug-2018 22:33

Editor sometimes buggy

All Replies

Posted by Community Admin on 08-May-2012 00:00

I have noticed in my development server testing 5.0sp1 that the editor is sometimes non-responsive.  It seems that when editing a page sometimes the "Edit" and "More" verbiage usually found on widgets is not there and the "Back to Pages" link does not function.  Seems as if a JavaScript error is happening.

I have tried in FF12 and IE 8 & 9 with the same results.

The screenshot highlights the issues.

Typically a refresh and everything works normally.  This only happens about every 5-8 edits.

Has anyone else seen this?

Posted by Community Admin on 10-May-2012 00:00

I have noticed that when this happens, one of the support files shows as a page not found.

/departments/academics/Action/b588729e-b2cf-4d78-829c-0a7acce3a3fb is one that is happening right now.

Page not found

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Page not found

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Page not found]
   Telerik.Sitefinity.Web.PageRouteHandler.handler_PreRenderComplete(Object sender, EventArgs e) +1132
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4543


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


Any possible reason this could be happening?

Anthony

Posted by Community Admin on 12-May-2012 00:00

Hi, Anthony.

Thank you for contacting us.

Yes, a javascript exception would break the scripts in our page editor meaning it will become unresponsive - you cannot edit/publish/click on anything - this is expected.

Based on your description I am not able to determine the exact cause of the error.
Are you using any custom javascript or custom widgets or modules?
If you use a debugger (FireBug, etc) can you check to see if everything loads and if not what?

Is this a live site? Can you give me temporary credentials to your backend so I can inspect it?


Regards,
Randy Hodge
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 14-May-2012 00:00

I am using the bytanium image rotator and some JavaScript for the menu at the top of our page.  Both of these have been in the site since it was developed in 4.0 with no problems.

This in only on the development server currently and only available internally.  We are doing testing this week before pushing it out to the public on Thursday evening.  The development server is not using a fully qualified domain name, and that may cause some problems with JavaScript depending on how they are written.

In Firebug everything loads except for two support files, one of which is show in the post below.  I have noticed that these do not load anytime, regardless of the editor being available or not.

I have not had this problem occur without being able to refresh and everything load normally.  The JavaScript errors disappear after a refresh as well.

Thanks.

Anthony

Posted by Community Admin on 15-May-2012 00:00

After further testing this is what I know.
1.  On a new fresh, blank install this does not happen.
2.  If I create a new blank template from scratch in the development site this does not happen.
3.  If I create a new blank template from scratch and apply my them this does not happen
4.  If I create a blank template based on my .master file, this happens.
5.  If I use any template based on my main template based on the .master file, this happens.
6.  If I use any of my templates based on the master, and strip all menus and content from them and then add one content block, this still happens.

So it seems to me that the problem lies somewhere in my main .master file, and every one of my templates is based on this file.

The contents of the master file are below:
layout02.master

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Layout02.master.cs" Inherits="App_Master_MasterPage" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="ScriptManager"></telerik:RadScriptManager>
<div id="doc2" class="yui-t2">
    <div id="hd">
        <!-- PUT MASTHEAD CODE HERE -->
        <asp:ContentPlaceHolder ID="Top" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    <div id="menu">
        <!-- PUT MENU CODE HERE -->
        <asp:ContentPlaceHolder ID="TopMenu" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    <div class="bd">
        <!-- CONTENT AND LAYOUT GENERATED BY SITEFINITY WILL GO HERE -->
         <asp:ContentPlaceHolder ID="MainContent" runat="server">
         </asp:ContentPlaceHolder>
              
    </div>
    <div id="ft">
        <!-- PUT FOOTER CODE HERE -->
        <asp:ContentPlaceHolder ID="Footer" runat="server">
        </asp:ContentPlaceHolder>
    </div>
</div>
    </form>
</body>
</html>

layout02.master.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
 
public partial class App_Master_MasterPage : System.Web.UI.MasterPage
    protected void Page_Load(object sender, EventArgs e)
    
 
    
 
 

Posted by Community Admin on 15-May-2012 00:00

Removing the:

<telerik:RadScriptManager runat="server" ID="ScriptManager"></telerik:RadScriptManager>
from my master page allows me to edit the pages without problem.

However, not all of the pages will load now as some are saying:

ScriptManager object is not set to a reference.

I can then go to that pages properties in the editor and check the box to load the RadScriptManager and it loads properly.

Having the ScriptManager in the .master and unchecking from the page properties does not alleviate the problem.

My questions are:
1. Will I have to go through each page and manually check the box to insert the manager or is there a way to set this globally?

2.  Is there a benefit to including the script manager in the .master versus in the page properties?

3.  What is the best solution?

Thank you.

Anthony

Posted by Community Admin on 17-May-2012 00:00

Hello, Anthony.

When a page is viewed in the backend, Sitefinity automatically adds a ScriptManager (for the extra controls used for editing) so if you have one in your master page you'll get two. This causes problems as you have seen. Checking the "Include RadScriptManager" box will include the ScriptManager only on the frontend for that page.

So, yes, you should remove it from your master page and check the box on all your pages.

But you don't need to do each one manually. You can use the API to do it. Something like this:

PageManager pageMgr = PageManager.GetManager();
 
var pageList = pageMgr.GetPageDataList().ToList().Where(p => p.IsBackendPage == false);
 
foreach (PageData page in pageList)
    page.IncludeScriptManager = true;
 
pageMgr.SaveChanges();
Of course you can change this to suit your exact needs - more filtering, etc.

I hope you find this information useful. Please contact us if you have further questions.


Regards,
Randy Hodge
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Jul-2012 00:00

Hi Randy,

I'm trying to implement the code you posted, but I get a permissions error.

"You are not allowed to modify this page: ..."

I get the above error when try to set IncludeScriptManager, but if I set another field like Title it will work.  Any idea why that might happen? Almost seems like IncludeScriptManager is a read-only field.

Thanks
-Rick

Posted by Community Admin on 17-Jul-2012 00:00

I figured out a solution for anyone else that comes across this.  i added the following line after the  pageMgr declaration.

pageMgr.Provider.SuppressSecurityChecks = true;

Posted by Community Admin on 18-Jul-2012 00:00

Hello, Anthony.

Rick is correct. Add that line of code and your error will not happen. You can also avoid it by being logged in to the site with an account that has the proper permissions before requesting the page with your code.

Please let us know if we can be of further assistance.

Regards,
Randy Hodge
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 20-Aug-2012 00:00

Can that code be added to the code behind of the master page or does it need to be on its own page as a control?

Also, I am curious as to why this only started being a problem in 5.0?  I have had the master page set up as such since the beginning in 4.0 with no issues.  The ScriptManager was actually added to the master page after a recommendation from Sitefinity support in case 467564.

Anthony

Posted by Community Admin on 22-Aug-2012 00:00

Hi Anthony,

You only need to run the code once to set all your pages to include a script manager.

Put it on a new webform, load the page and you're done. You can delete the page afterwards if you want.

After that, they will have that property set to true forever unless you go in and turn it off. When you make new pages, make sure you check the box IncludeScritpManager if they will need it.

Regards,
Randy Hodge
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items

This thread is closed